[][src]Enum teloxide::ApiErrorKind

pub enum ApiErrorKind {
    BotBlocked,
    MessageNotModified,
    MessageIdInvalid,
    MessageToForwardNotFound,
    MessageToDeleteNotFound,
    MessageTextIsEmpty,
    MessageCantBeEdited,
    MessageCantBeDeleted,
    MessageToEditNotFound,
    MessageToReplyNotFound,
    MessageIdentifierNotSpecified,
    MessageIsTooLong,
    ToMuchMessages,
    PollHasAlreadyClosed,
    PollMustHaveMoreOptions,
    PollCantHaveMoreOptions,
    PollOptionsMustBeNonEmpty,
    PollQuestionMustBeNonEmpty,
    PollOptionsLengthTooLong,
    PollQuestionLengthTooLong,
    MessageWithPollNotFound,
    MessageIsNotAPoll,
    ChatNotFound,
    UserNotFound,
    ChatDescriptionIsNotModified,
    InvalidQueryID,
    ButtonURLInvalid,
    ButtonDataInvalid,
    TextButtonsAreUnallowed,
    WrongFileID,
    GroupDeactivated,
    PhotoAsInputFileRequired,
    InvalidStickersSet,
    NotEnoughRightsToPinMessage,
    MethodNotAvailableInPrivateChats,
    CantDemoteChatCreator,
    CantRestrictSelf,
    NotEnoughRightsToRestrict,
    WebhookRequireHTTPS,
    BadWebhookPort,
    UnknownHost,
    CantParseUrl,
    CantParseEntities,
    CantGetUpdates,
    BotKicked,
    UserDeactivated,
    CantInitiateConversation,
    CantTalkWithBots,
    WrongHTTPurl,
    TerminatedByOtherGetUpdates,
    FileIdInvalid,
    Other,
}

A kind of an API error returned from Telegram.

Variants

BotBlocked

Occurs when the bot tries to send message to user who blocked the bot.

MessageNotModified

Occurs when bot tries to modify a message without modification content.

May happen in methods:

  1. EditMessageText
MessageIdInvalid

Occurs when bot tries to forward or delete a message which was deleted.

May happen in methods:

  1. ForwardMessage
  2. DeleteMessage
MessageToForwardNotFound

Occurs when bot tries to forward a message which does not exists.

May happen in methods:

  1. ForwardMessage
MessageToDeleteNotFound

Occurs when bot tries to delete a message which does not exists.

May happen in methods:

  1. DeleteMessage
MessageTextIsEmpty

Occurs when bot tries to send a text message without text.

May happen in methods:

  1. SendMessage
MessageCantBeEdited

Occurs when bot tries to edit a message after long time.

May happen in methods:

  1. EditMessageText
MessageCantBeDeleted

Occurs when bot tries to delete a someone else's message in group where it does not have enough rights.

May happen in methods:

  1. DeleteMessage
MessageToEditNotFound

Occurs when bot tries to edit a message which does not exists.

May happen in methods:

  1. EditMessageText
MessageToReplyNotFound

Occurs when bot tries to reply to a message which does not exists.

May happen in methods:

  1. SendMessage
MessageIdentifierNotSpecified

Occurs when bot tries to

MessageIsTooLong

Occurs when bot tries to send a message with text size greater then 4096 symbols.

May happen in methods:

  1. SendMessage
ToMuchMessages

Occurs when bot tries to send media group with more than 10 items.

May happen in methods:

  1. SendMediaGroup
PollHasAlreadyClosed

Occurs when bot tries to stop poll that has already been stopped.

May happen in methods:

  1. SendPoll
PollMustHaveMoreOptions

Occurs when bot tries to send poll with less than 2 options.

May happen in methods:

  1. SendPoll
PollCantHaveMoreOptions

Occurs when bot tries to send poll with more than 10 options.

May happen in methods:

  1. SendPoll
PollOptionsMustBeNonEmpty

Occurs when bot tries to send poll with empty option (without text).

May happen in methods:

  1. SendPoll
PollQuestionMustBeNonEmpty

Occurs when bot tries to send poll with empty question (without text).

May happen in methods:

  1. SendPoll
PollOptionsLengthTooLong

Occurs when bot tries to send poll with total size of options more than 100 symbols.

May happen in methods:

  1. SendPoll
PollQuestionLengthTooLong

Occurs when bot tries to send poll with question size more than 255 symbols.

May happen in methods:

  1. SendPoll
MessageWithPollNotFound

Occurs when bot tries to stop poll with message without poll.

May happen in methods:

  1. StopPoll
MessageIsNotAPoll

Occurs when bot tries to stop poll with message without poll.

May happen in methods:

  1. StopPoll
ChatNotFound

Occurs when bot tries to send a message to chat in which it is not a member.

May happen in methods:

  1. SendMessage
UserNotFound

Occurs when bot tries to send method with unknown user_id.

May happen in methods:

  1. getUserProfilePhotos
ChatDescriptionIsNotModified

Occurs when bot tries to send SetChatDescription with same text as in the current description.

May happen in methods:

  1. SetChatDescription
InvalidQueryID

Occurs when bot tries to answer to query after timeout expire.

May happen in methods:

  1. AnswerCallbackQuery
ButtonURLInvalid

Occurs when bot tries to send InlineKeyboardMarkup with invalid button url.

May happen in methods:

  1. SendMessage
ButtonDataInvalid

Occurs when bot tries to send button with data size more than 64 bytes.

May happen in methods:

  1. SendMessage
TextButtonsAreUnallowed

Occurs when bot tries to send button with data size == 0.

May happen in methods:

  1. SendMessage
WrongFileID

Occurs when bot tries to get file by wrong file id.

May happen in methods:

  1. GetFile
GroupDeactivated

Occurs when bot tries to do some with group which was deactivated.

PhotoAsInputFileRequired

Occurs when bot tries to set chat photo from file ID

May happen in methods:

  1. SetChatPhoto
InvalidStickersSet

Occurs when bot tries to add sticker to stickerset by invalid name.

May happen in methods:

  1. AddStickerToSet
NotEnoughRightsToPinMessage

Occurs when bot tries to pin a message without rights to pin in this chat.

May happen in methods:

  1. PinChatMessage
MethodNotAvailableInPrivateChats

Occurs when bot tries to use method in group which is allowed only in a supergroup or channel.

CantDemoteChatCreator

Occurs when bot tries to demote chat creator.

May happen in methods:

  1. PromoteChatMember
CantRestrictSelf

Occurs when bot tries to restrict self in group chats.

May happen in methods:

  1. RestrictChatMember
NotEnoughRightsToRestrict

Occurs when bot tries to restrict chat member without rights to restrict in this chat.

May happen in methods:

  1. RestrictChatMember
WebhookRequireHTTPS

Occurs when bot tries set webhook to protocol other than HTTPS.

May happen in methods:

  1. SetWebhook
BadWebhookPort

Occurs when bot tries to set webhook to port other than 80, 88, 443 or 8443.

May happen in methods:

  1. SetWebhook
UnknownHost

Occurs when bot tries to set webhook to unknown host.

May happen in methods:

  1. SetWebhook
CantParseUrl

Occurs when bot tries to set webhook to invalid URL.

May happen in methods:

  1. SetWebhook
CantParseEntities

Occurs when bot tries to send message with unfinished entities.

May happen in methods:

  1. SendMessage
CantGetUpdates

Occurs when bot tries to use getUpdates while webhook is active.

May happen in methods:

  1. GetUpdates
BotKicked

Occurs when bot tries to do some in group where bot was kicked.

May happen in methods:

  1. SendMessage
UserDeactivated

Occurs when bot tries to send message to deactivated user.

May happen in methods:

  1. SendMessage
CantInitiateConversation

Occurs when you tries to initiate conversation with a user.

May happen in methods:

  1. SendMessage
CantTalkWithBots

Occurs when you tries to send message to bot.

May happen in methods:

  1. SendMessage
WrongHTTPurl

Occurs when bot tries to send button with invalid http url.

May happen in methods:

  1. SendMessage
TerminatedByOtherGetUpdates

Occurs when bot tries GetUpdate before the timeout. Make sure that only one Updater is running.

May happen in methods:

  1. GetUpdates
FileIdInvalid

Occurs when bot tries to get file by invalid file id.

May happen in methods:

  1. GetFile
Other

Trait Implementations

impl Clone for ApiErrorKind[src]

impl Copy for ApiErrorKind[src]

impl Debug for ApiErrorKind[src]

impl<'de> Deserialize<'de> for ApiErrorKind[src]

impl Eq for ApiErrorKind[src]

impl Hash for ApiErrorKind[src]

impl PartialEq<ApiErrorKind> for ApiErrorKind[src]

impl StructuralEq for ApiErrorKind[src]

impl StructuralPartialEq for ApiErrorKind[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.