class Tourmaline::Update
- Tourmaline::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
- JSON::Serializable
Defined in:
tourmaline/types/api.crtourmaline/types/custom/update.cr
Constructors
- .new(pull : JSON::PullParser)
- .new(update_id : Int32 | Int64, message : Tourmaline::Message | Nil = nil, edited_message : Tourmaline::Message | Nil = nil, channel_post : Tourmaline::Message | Nil = nil, edited_channel_post : Tourmaline::Message | Nil = nil, message_reaction : Tourmaline::MessageReactionUpdated | Nil = nil, message_reaction_count : Tourmaline::MessageReactionCountUpdated | Nil = nil, inline_query : Tourmaline::InlineQuery | Nil = nil, chosen_inline_result : Tourmaline::ChosenInlineResult | Nil = nil, callback_query : Tourmaline::CallbackQuery | Nil = nil, shipping_query : Tourmaline::ShippingQuery | Nil = nil, pre_checkout_query : Tourmaline::PreCheckoutQuery | Nil = nil, poll : Tourmaline::Poll | Nil = nil, poll_answer : Tourmaline::PollAnswer | Nil = nil, my_chat_member : Tourmaline::ChatMemberUpdated | Nil = nil, chat_member : Tourmaline::ChatMemberUpdated | Nil = nil, chat_join_request : Tourmaline::ChatJoinRequest | Nil = nil, chat_boost : Tourmaline::ChatBoostUpdated | Nil = nil, removed_chat_boost : Tourmaline::ChatBoostRemoved | Nil = nil)
Instance Method Summary
- #animation?
- #anonymous_admin_message?
- #audio?
- #basketball?
- #bold_entity?
- #bot_command_entity?
- #bot_message?
- #bowling?
-
#callback_query : Tourmaline::CallbackQuery | Nil
Optional.
-
#callback_query=(callback_query : Tourmaline::CallbackQuery | Nil)
Optional.
- #callback_query?
- #caption?
- #cashtag_entity?
- #channel_chat_created?
- #channel_forward_message?
- #channel_message?
-
#channel_post : Tourmaline::Message | Nil
Optional.
-
#channel_post=(channel_post : Tourmaline::Message | Nil)
Optional.
- #channel_post?
-
#chat_boost : Tourmaline::ChatBoostUpdated | Nil
Optional.
-
#chat_boost=(chat_boost : Tourmaline::ChatBoostUpdated | Nil)
Optional.
-
#chat_join_request : Tourmaline::ChatJoinRequest | Nil
Optional.
-
#chat_join_request=(chat_join_request : Tourmaline::ChatJoinRequest | Nil)
Optional.
-
#chat_member : Tourmaline::ChatMemberUpdated | Nil
Optional.
-
#chat_member=(chat_member : Tourmaline::ChatMemberUpdated | Nil)
Optional.
- #chat_member?
- #chat_shared?
-
#chats
Returns all unique chats included in this update
-
#chats(&block : Chat -> )
Yields each unique chat in this update to the block.
-
#chosen_inline_result : Tourmaline::ChosenInlineResult | Nil
Optional.
-
#chosen_inline_result=(chosen_inline_result : Tourmaline::ChosenInlineResult | Nil)
Optional.
- #chosen_inline_result?
- #code_entity?
- #connected_website?
- #contact?
- #dart?
- #delete_chat_photo?
- #dice?
- #document?
-
#edited_channel_post : Tourmaline::Message | Nil
Optional.
-
#edited_channel_post=(edited_channel_post : Tourmaline::Message | Nil)
Optional.
- #edited_channel_post?
-
#edited_message : Tourmaline::Message | Nil
Optional.
-
#edited_message=(edited_message : Tourmaline::Message | Nil)
Optional.
- #edited_message?
- #email_entity?
- #football?
- #forum_topic_closed?
- #forum_topic_created?
- #forum_topic_edited?
- #forum_topic_reopened?
- #forwarded_message?
- #game?
- #general_forum_topic_hidden?
- #general_forum_topic_unhidden?
- #group_chat_created?
- #hashtag_entity?
-
#inline_query : Tourmaline::InlineQuery | Nil
Optional.
-
#inline_query=(inline_query : Tourmaline::InlineQuery | Nil)
Optional.
- #inline_query?
- #invoice?
- #italic_entity?
- #left_chat_member?
- #location?
- #media_group?
- #mention_entity?
-
#message : Tourmaline::Message | Nil
Optional.
-
#message=(message : Tourmaline::Message | Nil)
Optional.
- #message?
- #message_auto_delete_timer_changed?
-
#message_reaction : Tourmaline::MessageReactionUpdated | Nil
Optional.
-
#message_reaction=(message_reaction : Tourmaline::MessageReactionUpdated | Nil)
Optional.
-
#message_reaction_count : Tourmaline::MessageReactionCountUpdated | Nil
Optional.
-
#message_reaction_count=(message_reaction_count : Tourmaline::MessageReactionCountUpdated | Nil)
Optional.
- #migrate_from_chat_id?
- #migrate_to_chat_id?
-
#my_chat_member : Tourmaline::ChatMemberUpdated | Nil
Optional.
-
#my_chat_member=(my_chat_member : Tourmaline::ChatMemberUpdated | Nil)
Optional.
- #my_chat_member?
- #new_chat_members?
- #new_chat_photo?
- #new_chat_title?
- #passport_data?
- #phone_number_entity?
- #photo?
- #pinned_message?
-
#poll : Tourmaline::Poll | Nil
Optional.
-
#poll=(poll : Tourmaline::Poll | Nil)
Optional.
- #poll?
-
#poll_answer : Tourmaline::PollAnswer | Nil
Optional.
-
#poll_answer=(poll_answer : Tourmaline::PollAnswer | Nil)
Optional.
- #poll_answer?
-
#pre_checkout_query : Tourmaline::PreCheckoutQuery | Nil
Optional.
-
#pre_checkout_query=(pre_checkout_query : Tourmaline::PreCheckoutQuery | Nil)
Optional.
- #pre_checkout_query?
- #pre_entity?
- #proximity_alert_triggered?
-
#removed_chat_boost : Tourmaline::ChatBoostRemoved | Nil
Optional.
-
#removed_chat_boost=(removed_chat_boost : Tourmaline::ChatBoostRemoved | Nil)
Optional.
- #reply_markup?
- #reply_message?
-
#shipping_query : Tourmaline::ShippingQuery | Nil
Optional.
-
#shipping_query=(shipping_query : Tourmaline::ShippingQuery | Nil)
Optional.
- #shipping_query?
- #slot_machine?
- #soccerball?
- #spoiler_entity?
- #sticker?
- #strikethrough_entity?
- #successful_payment?
- #supergroup_chat_created?
- #text?
- #text_link_entity?
- #text_mention_entity?
- #thread_message?
- #underline_entity?
- #update?
- #update_actions : Array(UpdateAction)
-
#update_id : Int32 | Int64
The update's unique identifier.
-
#update_id=(update_id : Int32 | Int64)
The update's unique identifier.
- #url_entity?
- #user_message?
- #user_shared?
-
#users
Returns all users included in this update as a Set
-
#users(&block : User -> )
Yields each unique user in this update to the block.
- #venue?
- #via_bot?
- #video?
- #video_chat_ended?
- #video_chat_participants_invited?
- #video_chat_scheduled?
- #video_chat_started?
- #video_note?
- #voice?
- #web_app_data?
Constructor Detail
Instance Method Detail
Optional. New incoming callback query
Optional. New incoming channel post of any kind - text, photo, sticker, etc.
Optional. New incoming channel post of any kind - text, photo, sticker, etc.
Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.
Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.
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.
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.
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.
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.
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.
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.
Optional. New version of a channel post that is known to the bot and was edited
Optional. New version of a channel post that is known to the bot and was edited
Optional. New version of a message that is known to the bot and was edited
Optional. New version of a message that is known to the bot and was edited
Optional. New incoming inline query
Optional. New incoming message of any kind - text, photo, sticker, etc.
Optional. New incoming message of any kind - text, photo, sticker, etc.
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.
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.
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.
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.
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.
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.
Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot
Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot
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.
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.
Optional. New incoming pre-checkout query. Contains full information about checkout
Optional. New incoming pre-checkout query. Contains full information about checkout
Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.
Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.
Optional. New incoming shipping query. Only for invoices with flexible price
Optional. 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. 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.
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.