mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-26 03:13:45 +03:00
fix get_dialogs() return type in example
Catching up with 238198db
where get_dialogs
return type was changed.
This commit is contained in:
parent
33d6afa0bd
commit
b9cd9a6639
|
@ -138,15 +138,15 @@ class InteractiveTelegramClient(TelegramClient):
|
||||||
|
|
||||||
# Entities represent the user, chat or channel
|
# Entities represent the user, chat or channel
|
||||||
# corresponding to the dialog on the same index.
|
# corresponding to the dialog on the same index.
|
||||||
dialogs, entities = self.get_dialogs(limit=dialog_count)
|
dialogs = self.get_dialogs(limit=dialog_count)
|
||||||
|
|
||||||
i = None
|
i = None
|
||||||
while i is None:
|
while i is None:
|
||||||
print_title('Dialogs window')
|
print_title('Dialogs window')
|
||||||
|
|
||||||
# Display them so the user can choose
|
# Display them so the user can choose
|
||||||
for i, entity in enumerate(entities, start=1):
|
for i, dialog in enumerate(dialogs, start=1):
|
||||||
sprint('{}. {}'.format(i, get_display_name(entity)))
|
sprint('{}. {}'.format(i, get_display_name(dialog.entity)))
|
||||||
|
|
||||||
# Let the user decide who they want to talk to
|
# Let the user decide who they want to talk to
|
||||||
print()
|
print()
|
||||||
|
@ -177,7 +177,7 @@ class InteractiveTelegramClient(TelegramClient):
|
||||||
i = None
|
i = None
|
||||||
|
|
||||||
# Retrieve the selected user (or chat, or channel)
|
# Retrieve the selected user (or chat, or channel)
|
||||||
entity = entities[i]
|
entity = dialogs[i].entity
|
||||||
|
|
||||||
# Show some information
|
# Show some information
|
||||||
print_title('Chat with "{}"'.format(get_display_name(entity)))
|
print_title('Chat with "{}"'.format(get_display_name(entity)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user