mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
Updated README, minor changes and pip ready
The module is now ready to be installed via pip README.md has been updated to reflect these changes Minor changes to the interactive client example Versioning is now done by editting TelegramClient's __version__, rather than looking for the string
This commit is contained in:
@@ -211,7 +211,15 @@ class InteractiveTelegramClient(TelegramClient):
|
||||
@staticmethod
|
||||
def update_handler(update_object):
|
||||
if type(update_object) is UpdateShortMessage:
|
||||
print('[User #{} sent {}]'.format(update_object.user_id, update_object.message))
|
||||
if update_object.out:
|
||||
print('You sent {} to user #{}'.format(update_object.message, update_object.user_id))
|
||||
else:
|
||||
print('[User #{} sent {}]'.format(update_object.user_id, update_object.message))
|
||||
|
||||
elif type(update_object) is UpdateShortChatMessage:
|
||||
print('[Chat #{} sent {}]'.format(update_object.chat_id, update_object.message))
|
||||
if update_object.out:
|
||||
print('You sent {} to chat #{}'.format(update_object.message, update_object.chat_id))
|
||||
else:
|
||||
print('[Chat #{}, user #{} sent {}]'.format(update_object.chat_id,
|
||||
update_object.from_id,
|
||||
update_object.message))
|
||||
|
Reference in New Issue
Block a user