mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-10-23 17:36:26 +02:00
ordering of BadRequest errors
parent
94486959ac
commit
08d2e0556b
1 changed files with 4 additions and 4 deletions
|
@ -46,13 +46,13 @@ telegram.error.BadRequest: Query_id_invalid
|
|||
[...]
|
||||
telegram.error.BadRequest: Invalid file id
|
||||
|
||||
>>> bot.sendMessage(chat_id, 'a'*40960)
|
||||
[...]
|
||||
telegram.error.BadRequest: Message is too long
|
||||
|
||||
>>> bot.editMessageText(chat_id, "sample old message")
|
||||
[...]
|
||||
telegram.error.BadRequest: Message is not modified
|
||||
|
||||
>>> bot.sendMessage(chat_id, 'a'*40960)
|
||||
[...]
|
||||
telegram.error.BadRequest: Message is too long
|
||||
```
|
||||
|
||||
For the last one you can check if your message is too long by comparing with `telegram.constants.MAX_MESSAGE_LENGTH`. There is something similar for captions: `telegram.constants.MAX_CAPTION_LENGTH`.
|
||||
|
|
Loading…
Reference in a new issue