Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def content_type(self):
if self.text:
return ContentType.TEXT
if self.audio:
return ContentType.AUDIO
if self.animation:
return ContentType.ANIMATION
if self.document:
return ContentType.DOCUMENT
if self.game:
return ContentType.GAME
if self.photo:
return ContentType.PHOTO
if self.sticker:
return ContentType.STICKER
if self.video:
return ContentType.VIDEO
if self.video_note:
return ContentType.VIDEO_NOTE
if self.voice:
return ContentType.VOICE
if self.contact:
return ContentType.CONTACT
if self.venue:
return ContentType.VENUE
if self.location:
return ContentType.LOCATION
if self.migrate_to_chat_id:
return ContentType.MIGRATE_TO_CHAT_ID
if self.pinned_message:
return ContentType.PINNED_MESSAGE
if self.new_chat_title:
return ContentType.NEW_CHAT_TITLE
if self.new_chat_photo:
return ContentType.NEW_CHAT_PHOTO
if self.delete_chat_photo:
return ContentType.DELETE_CHAT_PHOTO
if self.group_chat_created:
return ContentType.GROUP_CHAT_CREATED
if self.passport_data:
return ContentType.PASSPORT_DATA
if self.poll:
return ContentType.POLL
return ContentType.UNKNOWN
if self.contact:
return ContentType.CONTACT
if self.venue:
return ContentType.VENUE
if self.location:
return ContentType.LOCATION
if self.new_chat_members:
return ContentType.NEW_CHAT_MEMBERS
if self.left_chat_member:
return ContentType.LEFT_CHAT_MEMBER
if self.invoice:
return ContentType.INVOICE
if self.successful_payment:
return ContentType.SUCCESSFUL_PAYMENT
if self.connected_website:
return ContentType.CONNECTED_WEBSITE
if self.migrate_from_chat_id:
return ContentType.MIGRATE_FROM_CHAT_ID
if self.migrate_to_chat_id:
return ContentType.MIGRATE_TO_CHAT_ID
if self.pinned_message:
return ContentType.PINNED_MESSAGE
if self.new_chat_title:
return ContentType.NEW_CHAT_TITLE
if self.new_chat_photo:
return ContentType.NEW_CHAT_PHOTO
if self.delete_chat_photo:
return ContentType.DELETE_CHAT_PHOTO
if self.group_chat_created:
return ContentType.GROUP_CHAT_CREATED
if self.passport_data:
return ContentType.PASSPORT_DATA
if self.video_note:
return ContentType.VIDEO_NOTE
if self.voice:
return ContentType.VOICE
if self.contact:
return ContentType.CONTACT
if self.venue:
return ContentType.VENUE
if self.location:
return ContentType.LOCATION
if self.new_chat_members:
return ContentType.NEW_CHAT_MEMBERS
if self.left_chat_member:
return ContentType.LEFT_CHAT_MEMBER
if self.invoice:
return ContentType.INVOICE
if self.successful_payment:
return ContentType.SUCCESSFUL_PAYMENT
if self.connected_website:
return ContentType.CONNECTED_WEBSITE
if self.migrate_from_chat_id:
return ContentType.MIGRATE_FROM_CHAT_ID
if self.migrate_to_chat_id:
return ContentType.MIGRATE_TO_CHAT_ID
if self.pinned_message:
return ContentType.PINNED_MESSAGE
if self.new_chat_title:
return ContentType.NEW_CHAT_TITLE
if self.new_chat_photo:
return ContentType.NEW_CHAT_PHOTO
if self.delete_chat_photo:
return ContentType.DELETE_CHAT_PHOTO
if self.venue:
return ContentType.VENUE
if self.location:
return ContentType.LOCATION
if self.new_chat_members:
return ContentType.NEW_CHAT_MEMBERS
if self.left_chat_member:
return ContentType.LEFT_CHAT_MEMBER
if self.invoice:
return ContentType.INVOICE
if self.successful_payment:
return ContentType.SUCCESSFUL_PAYMENT
if self.connected_website:
return ContentType.CONNECTED_WEBSITE
if self.migrate_from_chat_id:
return ContentType.MIGRATE_FROM_CHAT_ID
if self.migrate_to_chat_id:
return ContentType.MIGRATE_TO_CHAT_ID
if self.pinned_message:
return ContentType.PINNED_MESSAGE
if self.new_chat_title:
return ContentType.NEW_CHAT_TITLE
if self.new_chat_photo:
return ContentType.NEW_CHAT_PHOTO
if self.delete_chat_photo:
return ContentType.DELETE_CHAT_PHOTO
if self.group_chat_created:
return ContentType.GROUP_CHAT_CREATED
if self.passport_data:
return ContentType.PASSPORT_DATA
if self.poll:
return ContentType.POLL
def content_type(self):
if self.text:
return ContentType.TEXT
if self.audio:
return ContentType.AUDIO
if self.animation:
return ContentType.ANIMATION
if self.document:
return ContentType.DOCUMENT
if self.game:
return ContentType.GAME
if self.photo:
return ContentType.PHOTO
if self.sticker:
return ContentType.STICKER
if self.video:
return ContentType.VIDEO
if self.video_note:
return ContentType.VIDEO_NOTE
if self.voice:
return ContentType.VOICE
if self.contact:
return ContentType.CONTACT
if self.venue:
return ContentType.VENUE
if self.invoice:
return ContentType.INVOICE
if self.successful_payment:
return ContentType.SUCCESSFUL_PAYMENT
if self.connected_website:
return ContentType.CONNECTED_WEBSITE
if self.migrate_from_chat_id:
return ContentType.MIGRATE_FROM_CHAT_ID
if self.migrate_to_chat_id:
return ContentType.MIGRATE_TO_CHAT_ID
if self.pinned_message:
return ContentType.PINNED_MESSAGE
if self.new_chat_title:
return ContentType.NEW_CHAT_TITLE
if self.new_chat_photo:
return ContentType.NEW_CHAT_PHOTO
if self.delete_chat_photo:
return ContentType.DELETE_CHAT_PHOTO
if self.group_chat_created:
return ContentType.GROUP_CHAT_CREATED
if self.passport_data:
return ContentType.PASSPORT_DATA
if self.poll:
return ContentType.POLL
return ContentType.UNKNOWN
if self.game:
return ContentType.GAME
if self.photo:
return ContentType.PHOTO
if self.sticker:
return ContentType.STICKER
if self.video:
return ContentType.VIDEO
if self.video_note:
return ContentType.VIDEO_NOTE
if self.voice:
return ContentType.VOICE
if self.contact:
return ContentType.CONTACT
if self.venue:
return ContentType.VENUE
if self.location:
return ContentType.LOCATION
if self.new_chat_members:
return ContentType.NEW_CHAT_MEMBERS
if self.left_chat_member:
return ContentType.LEFT_CHAT_MEMBER
if self.invoice:
return ContentType.INVOICE
if self.successful_payment:
return ContentType.SUCCESSFUL_PAYMENT
if self.connected_website:
return ContentType.CONNECTED_WEBSITE
if self.migrate_from_chat_id:
return ContentType.MIGRATE_FROM_CHAT_ID
if self.migrate_to_chat_id:
return ContentType.MIGRATE_TO_CHAT_ID
if self.new_chat_members:
return ContentType.NEW_CHAT_MEMBERS
if self.left_chat_member:
return ContentType.LEFT_CHAT_MEMBER
if self.invoice:
return ContentType.INVOICE
if self.successful_payment:
return ContentType.SUCCESSFUL_PAYMENT
if self.connected_website:
return ContentType.CONNECTED_WEBSITE
if self.migrate_from_chat_id:
return ContentType.MIGRATE_FROM_CHAT_ID
if self.migrate_to_chat_id:
return ContentType.MIGRATE_TO_CHAT_ID
if self.pinned_message:
return ContentType.PINNED_MESSAGE
if self.new_chat_title:
return ContentType.NEW_CHAT_TITLE
if self.new_chat_photo:
return ContentType.NEW_CHAT_PHOTO
if self.delete_chat_photo:
return ContentType.DELETE_CHAT_PHOTO
if self.group_chat_created:
return ContentType.GROUP_CHAT_CREATED
if self.passport_data:
return ContentType.PASSPORT_DATA
if self.poll:
return ContentType.POLL
return ContentType.UNKNOWN
if self.location:
return ContentType.LOCATION
if self.new_chat_members:
return ContentType.NEW_CHAT_MEMBERS
if self.left_chat_member:
return ContentType.LEFT_CHAT_MEMBER
if self.invoice:
return ContentType.INVOICE
if self.successful_payment:
return ContentType.SUCCESSFUL_PAYMENT
if self.connected_website:
return ContentType.CONNECTED_WEBSITE
if self.migrate_from_chat_id:
return ContentType.MIGRATE_FROM_CHAT_ID
if self.migrate_to_chat_id:
return ContentType.MIGRATE_TO_CHAT_ID
if self.pinned_message:
return ContentType.PINNED_MESSAGE
if self.new_chat_title:
return ContentType.NEW_CHAT_TITLE
if self.new_chat_photo:
return ContentType.NEW_CHAT_PHOTO
if self.delete_chat_photo:
return ContentType.DELETE_CHAT_PHOTO
if self.group_chat_created:
return ContentType.GROUP_CHAT_CREATED
if self.passport_data:
return ContentType.PASSPORT_DATA
if self.poll:
return ContentType.POLL
return ContentType.UNKNOWN