telegram.error module¶
This module contains an object that represents Telegram errors.
-
exception
telegram.error.BadRequest(message)¶ Bases:
telegram.error.NetworkErrorRaised when Telegram could not process the request correctly.
-
exception
telegram.error.ChatMigrated(new_chat_id)¶ Bases:
telegram.error.TelegramErrorRaised when the requested group chat migrated to supergroup and has a new chat id.
- Parameters
new_chat_id (
int) – The new chat id of the group.
-
new_chat_id¶
-
exception
telegram.error.Conflict(message)¶ Bases:
telegram.error.TelegramErrorRaised when a long poll or webhook conflicts with another one.
-
exception
telegram.error.InvalidToken¶ Bases:
telegram.error.TelegramErrorRaised when the token is invalid.
-
exception
telegram.error.NetworkError(message)¶ Bases:
telegram.error.TelegramErrorBase class for exceptions due to networking errors.
-
exception
telegram.error.RetryAfter(retry_after)¶ Bases:
telegram.error.TelegramErrorRaised when flood limits where exceeded.
- Parameters
retry_after (
int) – Time in seconds, after which the bot can retry the request.
-
retry_after¶
-
exception
telegram.error.TelegramError(message)¶ Bases:
ExceptionBase class for Telegram errors.
-
message¶
-
-
exception
telegram.error.TimedOut¶ Bases:
telegram.error.NetworkErrorRaised when a request took too long to finish.
Bases:
telegram.error.TelegramErrorRaised when the bot has not enough rights to perform the requested action.