Enum carapax::types::UpdateType
source · pub enum UpdateType {
Show 23 variants
BotStatus(ChatMemberUpdated),
BusinessConnection(BusinessConnection),
BusinessMessage(Message),
CallbackQuery(CallbackQuery),
ChannelPost(Message),
ChatBoostRemoved(ChatBoostRemoved),
ChatBoostUpdated(ChatBoostUpdated),
ChatJoinRequest(ChatJoinRequest),
ChosenInlineResult(ChosenInlineResult),
DeletedBusinessMessages(BusinessMessagesDeleted),
EditedBusinessMessage(Message),
EditedChannelPost(Message),
EditedMessage(Message),
InlineQuery(InlineQuery),
Message(Message),
MessageReaction(MessageReactionUpdated),
MessageReactionCount(MessageReactionCountUpdated),
Poll(Poll),
PollAnswer(PollAnswer),
PreCheckoutQuery(PreCheckoutQuery),
ShippingQuery(ShippingQuery),
UserStatus(ChatMemberUpdated),
Unknown(Value),
}
Expand description
Represents a type of an update.
Variants§
BotStatus(ChatMemberUpdated)
The bot chat member status was updated in a chat.
For private chats, this update is received only when the bot is blocked or unblocked by the user.
BusinessConnection(BusinessConnection)
The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot.
BusinessMessage(Message)
New non-service message from a connected business account.
CallbackQuery(CallbackQuery)
A new incoming callback query.
ChannelPost(Message)
A new incoming channel post.
ChatBoostRemoved(ChatBoostRemoved)
A boost was removed from a chat.
The bot must be an administrator in the chat to receive these updates.
ChatBoostUpdated(ChatBoostUpdated)
A chat boost was added or changed.
The bot must be an administrator in the chat to receive these updates.
ChatJoinRequest(ChatJoinRequest)
A request to join the chat has been sent.
The bot must have the can_invite_users
administrator right
in the chat to receive these updates.
ChosenInlineResult(ChosenInlineResult)
The result of an inline query that was chosen by a user and sent to their chat partner.
Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.
DeletedBusinessMessages(BusinessMessagesDeleted)
Messages were deleted from a connected business account.
EditedBusinessMessage(Message)
New version of a message from a connected business account.
EditedChannelPost(Message)
A new version of a channel post that is known to the bot and was edited.
EditedMessage(Message)
A new version of a message that is known to the bot and was edited.
InlineQuery(InlineQuery)
A new incoming inline query.
Message(Message)
A new incoming message.
MessageReaction(MessageReactionUpdated)
A reaction to a message was changed by a user.
The bot must be an administrator in the chat
and must explicitly specify AllowedUpdate::MessageReaction
in the list of allowed_updates to receive these updates.
The update isn’t received for reactions set by bots.
MessageReactionCount(MessageReactionCountUpdated)
Reactions to a message with anonymous reactions were changed.
The bot must be an administrator in the chat
and must explicitly specify AllowedUpdate::MessageReactionCount
in the list of allowed_updates to receive these updates.
Poll(Poll)
A new poll state.
Bots receive only updates about polls, which are sent or stopped by the bot.
PollAnswer(PollAnswer)
A user changed their answer in a non-anonymous poll
Bots receive new votes only in polls that were sent by the bot itself.
PreCheckoutQuery(PreCheckoutQuery)
A new incoming pre-checkout query.
Contains full information about checkout
ShippingQuery(ShippingQuery)
A new incoming shipping query.
Only for invoices with flexible price.
UserStatus(ChatMemberUpdated)
A chat member’s status was updated in a chat.
The bot must be an administrator in the chat
and must explicitly specify AllowedUpdate::UserStatus
in the list
of allowed_updates
to receive these updates.
Unknown(Value)
Used for unknown update types.
For example, Telegram introduced a new update type, but tgbot does not support it.
Trait Implementations§
source§impl Clone for UpdateType
impl Clone for UpdateType
source§fn clone(&self) -> UpdateType
fn clone(&self) -> UpdateType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for UpdateType
impl Debug for UpdateType
source§impl<'de> Deserialize<'de> for UpdateType
impl<'de> Deserialize<'de> for UpdateType
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<UpdateType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<UpdateType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for UpdateType
impl PartialEq for UpdateType
source§fn eq(&self, other: &UpdateType) -> bool
fn eq(&self, other: &UpdateType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for UpdateType
impl Serialize for UpdateType
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for UpdateType
Auto Trait Implementations§
impl Freeze for UpdateType
impl RefUnwindSafe for UpdateType
impl Send for UpdateType
impl Sync for UpdateType
impl Unpin for UpdateType
impl UnwindSafe for UpdateType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more