mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
Start using the new Sender and Chat Getter interface
This commit is contained in:
@@ -371,7 +371,7 @@ class InteractiveTelegramClient(TelegramClient):
|
||||
# with events. Since they are methods, you know they may make an API
|
||||
# call, which can be expensive.
|
||||
chat = await event.get_chat()
|
||||
if event.is_group:
|
||||
if chat.is_group:
|
||||
if event.out:
|
||||
sprint('>> sent "{}" to chat {}'.format(
|
||||
event.text, get_display_name(chat)
|
||||
|
@@ -78,7 +78,7 @@ async def handler(event):
|
||||
# and we said "save pic" in the message
|
||||
if event.out and event.is_reply and 'save pic' in event.raw_text:
|
||||
reply_msg = await event.get_reply_message()
|
||||
replied_to_user = await reply_msg.get_input_sender()
|
||||
replied_to_user = reply_msg.sender
|
||||
|
||||
message = await event.reply('Downloading your profile photo...')
|
||||
file = await client.download_profile_photo(replied_to_user)
|
||||
|
Reference in New Issue
Block a user