Skip to content

class Tourmaline::Update
inherits Reference #

This object represents an incoming update. At most one of the optional parameters can be present in any given update.

Included modules

JSON::Serializable

Constructors#

.new(pull : JSON::PullParser) #

View source

.new(update_id, message : Tourmaline::Message? = nil, edited_message : Tourmaline::Message? = nil, channel_post : Tourmaline::Message? = nil, edited_channel_post : Tourmaline::Message? = nil, message_reaction : Tourmaline::MessageReactionUpdated? = nil, message_reaction_count : Tourmaline::MessageReactionCountUpdated? = nil, inline_query : Tourmaline::InlineQuery? = nil, chosen_inline_result : Tourmaline::ChosenInlineResult? = nil, callback_query : Tourmaline::CallbackQuery? = nil, shipping_query : Tourmaline::ShippingQuery? = nil, pre_checkout_query : Tourmaline::PreCheckoutQuery? = nil, poll : Tourmaline::Poll? = nil, poll_answer : Tourmaline::PollAnswer? = nil, my_chat_member : Tourmaline::ChatMemberUpdated? = nil, chat_member : Tourmaline::ChatMemberUpdated? = nil, chat_join_request : Tourmaline::ChatJoinRequest? = nil, chat_boost : Tourmaline::ChatBoostUpdated? = nil, removed_chat_boost : Tourmaline::ChatBoostRemoved? = nil) #

View source

Methods#

#animation? #

View source

#anonymous_admin_message? #

View source

#audio? #

View source

#basketball? #

View source

#bold_entity? #

View source

#bot_command_entity? #

View source

#bot_message? #

View source

#bowling? #

View source

#callback_query : Tourmaline::CallbackQuery? #

Optional. New incoming callback query

View source

#callback_query=(callback_query : Tourmaline::CallbackQuery?) #

Optional. New incoming callback query

View source

#callback_query? #

View source

#caption? #

View source

#cashtag_entity? #

View source

#channel_chat_created? #

View source

#channel_forward_message? #

View source

#channel_message? #

View source

#channel_post : Tourmaline::Message? #

Optional. New incoming channel post of any kind - text, photo, sticker, etc.

View source

#channel_post=(channel_post : Tourmaline::Message?) #

Optional. New incoming channel post of any kind - text, photo, sticker, etc.

View source

#channel_post? #

View source

#chat_boost : Tourmaline::ChatBoostUpdated? #

Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.

View source

#chat_boost=(chat_boost : Tourmaline::ChatBoostUpdated?) #

Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.

View source

#chat_join_request : Tourmaline::ChatJoinRequest? #

Optional. 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.

View source

#chat_join_request=(chat_join_request : Tourmaline::ChatJoinRequest?) #

Optional. 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.

View source

#chat_member : Tourmaline::ChatMemberUpdated? #

Optional. 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.

View source

#chat_member=(chat_member : Tourmaline::ChatMemberUpdated?) #

Optional. 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.

View source

#chat_member? #

View source

#chat_shared? #

View source

#chats(&block : Chat -> ) #

Yields each unique chat in this update to the block.

View source

#chats #

Returns all unique chats included in this update

View source

#chosen_inline_result : Tourmaline::ChosenInlineResult? #

Optional. 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.

View source

#chosen_inline_result=(chosen_inline_result : Tourmaline::ChosenInlineResult?) #

Optional. 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.

View source

#chosen_inline_result? #

View source

#code_entity? #

View source

#connected_website? #

View source

#contact? #

View source

#dart? #

View source

#delete_chat_photo? #

View source

#dice? #

View source

#document? #

View source

#edited_channel_post : Tourmaline::Message? #

Optional. New version of a channel post that is known to the bot and was edited

View source

#edited_channel_post=(edited_channel_post : Tourmaline::Message?) #

Optional. New version of a channel post that is known to the bot and was edited

View source

#edited_channel_post? #

View source

#edited_message : Tourmaline::Message? #

Optional. New version of a message that is known to the bot and was edited

View source

#edited_message=(edited_message : Tourmaline::Message?) #

Optional. New version of a message that is known to the bot and was edited

View source

#edited_message? #

View source

#email_entity? #

View source

#football? #

View source

#forum_topic_closed? #

View source

#forum_topic_created? #

View source

#forum_topic_edited? #

View source

#forum_topic_reopened? #

View source

#forwarded_message? #

View source

#game? #

View source

#general_forum_topic_hidden? #

View source

#general_forum_topic_unhidden? #

View source

#group_chat_created? #

View source

#hashtag_entity? #

View source

#inline_query : Tourmaline::InlineQuery? #

Optional. New incoming inline query

View source

#inline_query=(inline_query : Tourmaline::InlineQuery?) #

Optional. New incoming inline query

View source

#inline_query? #

View source

#invoice? #

View source

#italic_entity? #

View source

#left_chat_member? #

View source

#location? #

View source

#media_group? #

View source

#mention_entity? #

View source

#message : Tourmaline::Message? #

Optional. New incoming message of any kind - text, photo, sticker, etc.

View source

#message=(message : Tourmaline::Message?) #

Optional. New incoming message of any kind - text, photo, sticker, etc.

View source

#message? #

View source

#message_auto_delete_timer_changed? #

View source

#message_reaction : Tourmaline::MessageReactionUpdated? #

Optional. 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.

View source

#message_reaction=(message_reaction : Tourmaline::MessageReactionUpdated?) #

Optional. 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.

View source

#message_reaction_count : Tourmaline::MessageReactionCountUpdated? #

Optional. 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.

View source

#message_reaction_count=(message_reaction_count : Tourmaline::MessageReactionCountUpdated?) #

Optional. 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.

View source

#migrate_from_chat_id? #

View source

#migrate_to_chat_id? #

View source

#my_chat_member : Tourmaline::ChatMemberUpdated? #

Optional. 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.

View source

#my_chat_member=(my_chat_member : Tourmaline::ChatMemberUpdated?) #

Optional. 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.

View source

#my_chat_member? #

View source

#new_chat_members? #

View source

#new_chat_photo? #

View source

#new_chat_title? #

View source

#passport_data? #

View source

#phone_number_entity? #

View source

#photo? #

View source

#pinned_message? #

View source

#poll : Tourmaline::Poll? #

Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot

View source

#poll=(poll : Tourmaline::Poll?) #

Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot

View source

#poll? #

View source

#poll_answer : Tourmaline::PollAnswer? #

Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.

View source

#poll_answer=(poll_answer : Tourmaline::PollAnswer?) #

Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.

View source

#poll_answer? #

View source

#pre_checkout_query : Tourmaline::PreCheckoutQuery? #

Optional. New incoming pre-checkout query. Contains full information about checkout

View source

#pre_checkout_query=(pre_checkout_query : Tourmaline::PreCheckoutQuery?) #

Optional. New incoming pre-checkout query. Contains full information about checkout

View source

#pre_checkout_query? #

View source

#pre_entity? #

View source

#proximity_alert_triggered? #

View source

#removed_chat_boost : Tourmaline::ChatBoostRemoved? #

Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.

View source

#removed_chat_boost=(removed_chat_boost : Tourmaline::ChatBoostRemoved?) #

Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.

View source

#reply_markup? #

View source

#reply_message? #

View source

#shipping_query : Tourmaline::ShippingQuery? #

Optional. New incoming shipping query. Only for invoices with flexible price

View source

#shipping_query=(shipping_query : Tourmaline::ShippingQuery?) #

Optional. New incoming shipping query. Only for invoices with flexible price

View source

#shipping_query? #

View source

#slot_machine? #

View source

#soccerball? #

View source

#spoiler_entity? #

View source

#sticker? #

View source

#strikethrough_entity? #

View source

#successful_payment? #

View source

#supergroup_chat_created? #

View source

#text? #

View source
View source

#text_mention_entity? #

View source

#thread_message? #

View source

#underline_entity? #

View source

#update? #

View source

#update_actions : Array(UpdateAction) #

View source

#update_id : Int32 | Int64 #

The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.

View source

#update_id=(update_id : Int32 | Int64) #

The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.

View source

#url_entity? #

View source

#user_message? #

View source

#user_shared? #

View source

#users #

Returns all users included in this update as a Set

View source

#users(&block : User -> ) #

Yields each unique user in this update to the block.

View source

#venue? #

View source

#via_bot? #

View source

#video? #

View source

#video_chat_ended? #

View source

#video_chat_participants_invited? #

View source

#video_chat_scheduled? #

View source

#video_chat_started? #

View source

#video_note? #

View source

#voice? #

View source

#web_app_data? #

View source