mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 18:01:04 +00:00
Reformat code. Use rel imports.
This commit is contained in:
parent
ab7934f333
commit
4dba8f534e
21 changed files with 44 additions and 46 deletions
|
|
@ -21,12 +21,12 @@ from .voice import Voice
|
|||
|
||||
|
||||
class Message(Deserializable):
|
||||
def __init__(self, message_id, from_user, date, chat, forward_from, forward_from_chat,
|
||||
forward_from_message_id, forward_date, reply_to_message, edit_date, text, entities, audio, document,
|
||||
game, photo, sticker, video, voice, video_note, new_chat_members, caption, contact, location, venue,
|
||||
left_chat_member, new_chat_title, new_chat_photo, delete_chat_photo,
|
||||
group_chat_created, supergroup_chat_created, channel_chat_created, migrate_to_chat_id,
|
||||
migrate_from_chat_id, pinned_message, invoice, successful_payment, content_type):
|
||||
def __init__(self, message_id, from_user, date, chat, forward_from, forward_from_chat, forward_from_message_id,
|
||||
forward_date, reply_to_message, edit_date, text, entities, audio, document, game, photo, sticker,
|
||||
video, voice, video_note, new_chat_members, caption, contact, location, venue, left_chat_member,
|
||||
new_chat_title, new_chat_photo, delete_chat_photo, group_chat_created, supergroup_chat_created,
|
||||
channel_chat_created, migrate_to_chat_id, migrate_from_chat_id, pinned_message, invoice,
|
||||
successful_payment, content_type):
|
||||
self.message_id: int = message_id
|
||||
self.from_user: User = from_user
|
||||
self.date: datetime.datetime = date
|
||||
|
|
@ -140,13 +140,12 @@ class Message(Deserializable):
|
|||
else:
|
||||
content_type = ContentType.UNKNOWN
|
||||
|
||||
return Message(message_id, from_user, date, chat, forward_from, forward_from_chat,
|
||||
forward_from_message_id, forward_date, reply_to_message, edit_date, text, entities, audio,
|
||||
document, game, photo, sticker, video, voice, video_note, new_chat_members, caption, contact,
|
||||
location, venue, left_chat_member, new_chat_title, new_chat_photo,
|
||||
delete_chat_photo, group_chat_created, supergroup_chat_created, channel_chat_created,
|
||||
migrate_to_chat_id, migrate_from_chat_id, pinned_message, invoice, successful_payment,
|
||||
content_type)
|
||||
return Message(message_id, from_user, date, chat, forward_from, forward_from_chat, forward_from_message_id,
|
||||
forward_date, reply_to_message, edit_date, text, entities, audio, document, game, photo, sticker,
|
||||
video, voice, video_note, new_chat_members, caption, contact, location, venue, left_chat_member,
|
||||
new_chat_title, new_chat_photo, delete_chat_photo, group_chat_created, supergroup_chat_created,
|
||||
channel_chat_created, migrate_to_chat_id, migrate_from_chat_id, pinned_message, invoice,
|
||||
successful_payment, content_type)
|
||||
|
||||
def is_command(self):
|
||||
return self.text and self.text.startswith('/')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue