class
Hamilton::Types::Update
- Hamilton::Types::Update
- Reference
- Object
Overview
This object represents an incoming update. At most one of the optional parameters can be present in any given update.
Included Modules
- Hamilton::Types::Common
- JSON::Serializable
Defined in:
types/update.crConstructors
- .new(pull : JSON::PullParser)
- .new(params)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
- .new(**params)
Instance Method Summary
-
#business_connection : Hamilton::Types::BusinessConnection | Nil
The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot.
-
#business_connection=(business_connection : Hamilton::Types::BusinessConnection | Nil)
The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot.
-
#business_message : Hamilton::Types::Message | Nil
New message from a connected business account.
-
#business_message=(business_message : Hamilton::Types::Message | Nil)
New message from a connected business account.
-
#callback_query : Hamilton::Types::CallbackQuery | Nil
New incoming callback query.
-
#callback_query=(callback_query : Hamilton::Types::CallbackQuery | Nil)
New incoming callback query.
-
#channel_post : Hamilton::Types::Message | Nil
New incoming channel post of any kind - text, photo, sticker, etc.
-
#channel_post=(channel_post : Hamilton::Types::Message | Nil)
New incoming channel post of any kind - text, photo, sticker, etc.
-
#chat_boost : Hamilton::Types::ChatBoostUpdated | Nil
A chat boost was added or changed.
-
#chat_boost=(chat_boost : Hamilton::Types::ChatBoostUpdated | Nil)
A chat boost was added or changed.
-
#chat_join_request : Hamilton::Types::ChatJoinRequest | Nil
A request to join the chat has been sent.
-
#chat_join_request=(chat_join_request : Hamilton::Types::ChatJoinRequest | Nil)
A request to join the chat has been sent.
-
#chat_member : Hamilton::Types::ChatMemberUpdated | Nil
A chat member's status was updated in a chat.
-
#chat_member=(chat_member : Hamilton::Types::ChatMemberUpdated | Nil)
A chat member's status was updated in a chat.
-
#chosen_inline_result : Hamilton::Types::ChosenInlineResult | Nil
The result of an inline query that was chosen by a user and sent to their chat partner.
-
#chosen_inline_result=(chosen_inline_result : Hamilton::Types::ChosenInlineResult | Nil)
The result of an inline query that was chosen by a user and sent to their chat partner.
-
#deleted_business_messages : Hamilton::Types::BusinessMessagesDeleted | Nil
Messages were deleted from a connected business account.
-
#deleted_business_messages=(deleted_business_messages : Hamilton::Types::BusinessMessagesDeleted | Nil)
Messages were deleted from a connected business account.
-
#edited_business_message : Hamilton::Types::Message | Nil
New version of a message from a connected business account.
-
#edited_business_message=(edited_business_message : Hamilton::Types::Message | Nil)
New version of a message from a connected business account.
-
#edited_channel_post : Hamilton::Types::Message | Nil
New version of a channel post that is known to the bot and was edited.
-
#edited_channel_post=(edited_channel_post : Hamilton::Types::Message | Nil)
New version of a channel post that is known to the bot and was edited.
-
#edited_message : Hamilton::Types::Message | Nil
New version of a message that is known to the bot and was edited.
-
#edited_message=(edited_message : Hamilton::Types::Message | Nil)
New version of a message that is known to the bot and was edited.
-
#inline_query : Hamilton::Types::InlineQuery | Nil
New incoming inline query.
-
#inline_query=(inline_query : Hamilton::Types::InlineQuery | Nil)
New incoming inline query.
-
#message : Hamilton::Types::Message | Nil
New incoming message of any kind - text, photo, sticker, etc.
-
#message=(message : Hamilton::Types::Message | Nil)
New incoming message of any kind - text, photo, sticker, etc.
-
#message_reaction : Hamilton::Types::MessageReactionUpdated | Nil
A reaction to a message was changed by a user.
-
#message_reaction=(message_reaction : Hamilton::Types::MessageReactionUpdated | Nil)
A reaction to a message was changed by a user.
-
#message_reaction_count : Hamilton::Types::MessageReactionCountUpdated | Nil
Reactions to a message with anonymous reactions were changed.
-
#message_reaction_count=(message_reaction_count : Hamilton::Types::MessageReactionCountUpdated | Nil)
Reactions to a message with anonymous reactions were changed.
-
#my_chat_member : Hamilton::Types::ChatMemberUpdated | Nil
The bot's chat member status was updated in a chat.
-
#my_chat_member=(my_chat_member : Hamilton::Types::ChatMemberUpdated | Nil)
The bot's chat member status was updated in a chat.
-
#non_nil_fields : Array(String)
List of available non-nil fields.
-
#non_nil_fields=(non_nil_fields : Array(String))
List of available non-nil fields.
-
#poll : Hamilton::Types::Poll | Nil
New poll state.
-
#poll=(poll : Hamilton::Types::Poll | Nil)
New poll state.
-
#poll_answer : Hamilton::Types::PollAnswer | Nil
A user changed their answer in a non-anonymous poll.
-
#poll_answer=(poll_answer : Hamilton::Types::PollAnswer | Nil)
A user changed their answer in a non-anonymous poll.
-
#pre_checkout_query : Hamilton::Types::PreCheckoutQuery | Nil
New incoming pre-checkout query.
-
#pre_checkout_query=(pre_checkout_query : Hamilton::Types::PreCheckoutQuery | Nil)
New incoming pre-checkout query.
-
#purchased_paid_media : Hamilton::Types::PaidMediaPurchased | Nil
A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat.
-
#purchased_paid_media=(purchased_paid_media : Hamilton::Types::PaidMediaPurchased | Nil)
A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat.
-
#removed_chat_boost : Hamilton::Types::ChatBoostRemoved | Nil
A boost was removed from a chat.
-
#removed_chat_boost=(removed_chat_boost : Hamilton::Types::ChatBoostRemoved | Nil)
A boost was removed from a chat.
-
#shipping_query : Hamilton::Types::ShippingQuery | Nil
New incoming shipping query.
-
#shipping_query=(shipping_query : Hamilton::Types::ShippingQuery | Nil)
New incoming shipping query.
-
#update_id : Int32
The update's unique identifier.
-
#update_id=(update_id : Int32)
The update's unique identifier.
Instance methods inherited from class Reference
==(other : Hamilton::Any)
==
Instance methods inherited from class Object
===(other : Hamilton::Any)
===
Constructor Detail
Instance Method Detail
The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot.
The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot.
New message from a connected business account.
New message from a connected business account.
New incoming callback query.
New incoming channel post of any kind - text, photo, sticker, etc.
New incoming channel post of any kind - text, photo, sticker, etc.
A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.
A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.
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.
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.
A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify "chat_member" in the list of allowed_updates to receive these updates.
A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify "chat_member" in the list of allowed_updates to receive these updates.
The result of an inline query that was chosen by a user and sent to their chat partner.
The result of an inline query that was chosen by a user and sent to their chat partner.
Messages were deleted from a connected business account.
Messages were deleted from a connected business account.
New version of a message from a connected business account.
New version of a message from a connected business account.
New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.
New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.
New version of a message that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.
New version of a message that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.
New incoming message of any kind - text, photo, sticker, etc.
New incoming message of any kind - text, photo, sticker, etc.
A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify "message_reaction" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots.
A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify "message_reaction" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots.
Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify "message_reaction_count" in the list of allowed_updates to receive these updates. The updates are grouped and can be sent with delay up to a few minutes.
Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify "message_reaction_count" in the list of allowed_updates to receive these updates. The updates are grouped and can be sent with delay up to a few minutes.
The bot's 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.
The bot's 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.
New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot.
New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot.
A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.
A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.
New incoming pre-checkout query. Contains full information about checkout.
New incoming pre-checkout query. Contains full information about checkout.
A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat.
A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat.
A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.
A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.
New incoming shipping query. Only for invoices with flexible price.
New incoming shipping query. Only for invoices with flexible price.
The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially.
The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially.