ordering of BadRequest errors

Vahid Masoumi 2017-04-17 00:57:07 +04:30
parent 94486959ac
commit 08d2e0556b

@ -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`.