telegram.constants Module¶
Constants in the Telegram network.
The following constants were extracted from the Telegram Bots FAQ.
-
telegram.constants.
MAX_MESSAGE_LENGTH
¶ int
– 4096
-
telegram.constants.
MAX_CAPTION_LENGTH
¶ int
– 1024
-
telegram.constants.
SUPPORTED_WEBHOOK_PORTS
¶ List[
int
] – [443, 80, 88, 8443]
-
telegram.constants.
MAX_FILESIZE_DOWNLOAD
¶ int
– In bytes (20MB)
-
telegram.constants.
MAX_FILESIZE_UPLOAD
¶ int
– In bytes (50MB)
-
telegram.constants.
MAX_MESSAGES_PER_SECOND_PER_CHAT
¶ int
– 1. Telegram may allow short bursts that go over this limit, but eventually you’ll begin receiving 429 errors.
-
telegram.constants.
MAX_MESSAGES_PER_SECOND
¶ int
– 30
-
telegram.constants.
MAX_MESSAGES_PER_MINUTE_PER_GROUP
¶ int
– 20
-
telegram.constants.
MAX_INLINE_QUERY_RESULTS
¶ int
– 50
The following constant have been found by experimentation:
-
telegram.constants.
MAX_MESSAGE_ENTITIES
¶ int
– 100 (Beyond this cap telegram will simply ignore further formatting styles)