class Tourmaline::Update
- Tourmaline::Update
- Reference
- Object
Overview
This object represents a Telegram user or bot.
Included Modules
- JSON::Serializable
Defined in:
tourmaline/models/update.crConstructors
Instance Method Summary
- #animation?
- #anonymous_admin_message?
- #audio?
- #basketball?
- #bold_entity?
- #bot_command_entity?
- #bot_message?
- #bowling?
-
#callback_query : CallbackQuery | Nil
Optional.
- #callback_query?
- #caption?
- #cashtag_entity?
- #channel_chat_created?
- #channel_forward_message?
- #channel_message?
-
#channel_post : Message | Nil
Optional.
- #channel_post?
-
#chat_join_request : ChatJoinRequest | Nil
Optional.
-
#chat_member : 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 : ChosenInlineResult | Nil
Optional.
- #chosen_inline_result?
- #code_entity?
- #connected_website?
- #contact?
- #dart?
- #delete_chat_photo?
- #dice?
- #document?
-
#edited_channel_post : Message | Nil
Optional.
- #edited_channel_post?
-
#edited_message : 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 : InlineQuery | Nil
Optional.
- #inline_query?
- #invoice?
- #italic_entity?
- #left_chat_member?
- #location?
- #media_group?
- #mention_entity?
-
#message : Message | Nil
Optional.
- #message?
- #message_auto_delete_timer_changed?
- #migrate_from_chat_id?
- #migrate_to_chat_id?
-
#my_chat_member : ChatMemberUpdated | Nil
Optional.
- #my_chat_member?
- #new_chat_members?
- #new_chat_photo?
- #new_chat_title?
- #passport_data?
- #phone_number_entity?
- #photo?
- #pinned_message?
-
#poll : Poll | Nil
Optional.
- #poll?
-
#poll_answer : PollAnswer | Nil
Optional.
- #poll_answer?
-
#pre_checkout_query : PreCheckoutQuery | Nil
Optional.
- #pre_checkout_query?
- #pre_entity?
- #proximity_alert_triggered?
- #reply_markup?
- #reply_message?
-
#shipping_query : 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 : 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 channel post of any kind — text, photo, sticker, etc.
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. 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 message that is known to the bot and was edited
Optional. New incoming message of any kind — text, photo, sticker, etc.
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. 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 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.