class Telegram::API::Update
- Telegram::API::Update
- Telegram::API::Type
- Reference
- Object
Overview
This object represents an incoming update.At most one of the optional parameters can be present in any given update.
Defined in:
telegram/api/generated/types.crtelegram/api/overrides/update.cr
Constructors
-
.new(pull : JSON::PullParser)
This object represents an incoming update.At most one of the optional parameters can be present in any given update.
- .new(update_id : Int32, message : Message | Nil = nil, edited_message : Message | Nil = nil, channel_post : Message | Nil = nil, edited_channel_post : Message | Nil = nil, inline_query : InlineQuery | Nil = nil, chosen_inline_result : ChosenInlineResult | Nil = nil, callback_query : CallbackQuery | Nil = nil, shipping_query : ShippingQuery | Nil = nil, pre_checkout_query : PreCheckoutQuery | Nil = nil, poll : Poll | Nil = nil, poll_answer : PollAnswer | Nil = nil, my_chat_member : ChatMemberUpdated | Nil = nil, chat_member : ChatMemberUpdated | Nil = nil, chat_join_request : ChatJoinRequest | Nil = nil)
Instance Method Summary
- #all_entity?
- #animation_entity?
- #anonymous_admin_message_entity?
- #audio_entity?
- #basketball_entity?
- #bold_entity?
- #bot_command_entity?
- #bot_message_entity?
- #bowling_entity?
-
#callback_query : CallbackQuery | Nil
Optional.
-
#callback_query=(callback_query : CallbackQuery | Nil)
Optional.
- #callback_query_entity?
- #caption_entity?
- #cashtag_entity?
- #channel_chat_created_entity?
- #channel_forward_message_entity?
- #channel_message_entity?
-
#channel_post : Message | Nil
Optional.
-
#channel_post=(channel_post : Message | Nil)
Optional.
- #channel_post_entity?
-
#chat_join_request : ChatJoinRequest | Nil
Optional.
-
#chat_join_request=(chat_join_request : ChatJoinRequest | Nil)
Optional.
-
#chat_member : ChatMemberUpdated | Nil
Optional.
-
#chat_member=(chat_member : ChatMemberUpdated | Nil)
Optional.
- #chat_member_entity?
-
#chosen_inline_result : ChosenInlineResult | Nil
Optional.
-
#chosen_inline_result=(chosen_inline_result : ChosenInlineResult | Nil)
Optional.
- #chosen_inline_result_entity?
- #code_entity?
- #connected_website_entity?
- #contact_entity?
- #dart_entity?
- #delete_chat_photo_entity?
- #dice_entity?
- #document_entity?
-
#edited_channel_post : Message | Nil
Optional.
-
#edited_channel_post=(edited_channel_post : Message | Nil)
Optional.
- #edited_channel_post_entity?
-
#edited_message : Message | Nil
Optional.
-
#edited_message=(edited_message : Message | Nil)
Optional.
- #edited_message_entity?
- #email_entity?
- #football_entity?
- #forwarded_message_entity?
- #game_entity?
- #group_chat_created_entity?
- #hashtag_entity?
-
#inline_query : InlineQuery | Nil
Optional.
-
#inline_query=(inline_query : InlineQuery | Nil)
Optional.
- #inline_query_entity?
- #invoice_entity?
- #italic_entity?
- #left_chat_member_entity?
- #location_entity?
- #media_group_entity?
- #mention_entity?
-
#message : Message | Nil
Optional.
-
#message=(message : Message | Nil)
Optional.
- #message_auto_delete_timer_changed_entity?
- #message_entity?
- #migrate_from_chat_id_entity?
- #migrate_to_chat_id_entity?
-
#my_chat_member : ChatMemberUpdated | Nil
Optional.
-
#my_chat_member=(my_chat_member : ChatMemberUpdated | Nil)
Optional.
- #my_chat_member_entity?
- #new_chat_members_entity?
- #new_chat_photo_entity?
- #new_chat_title_entity?
- #none_entity?
- #passport_data_entity?
- #phone_number_entity?
- #photo_entity?
- #pinned_message_entity?
-
#poll : Poll | Nil
Optional.
-
#poll=(poll : Poll | Nil)
Optional.
-
#poll_answer : PollAnswer | Nil
Optional.
-
#poll_answer=(poll_answer : PollAnswer | Nil)
Optional.
- #poll_answer_entity?
- #poll_entity?
-
#pre_checkout_query : PreCheckoutQuery | Nil
Optional.
-
#pre_checkout_query=(pre_checkout_query : PreCheckoutQuery | Nil)
Optional.
- #pre_checkout_query_entity?
- #pre_entity?
- #proximity_alert_triggered_entity?
- #reply_markup_entity?
- #reply_message_entity?
-
#shipping_query : ShippingQuery | Nil
Optional.
-
#shipping_query=(shipping_query : ShippingQuery | Nil)
Optional.
- #shipping_query_entity?
- #slot_machine_entity?
- #soccerball_entity?
- #spoiler_entity?
- #sticker_entity?
- #strikethrough_entity?
- #successful_payment_entity?
- #supergroup_chat_created_entity?
- #text_entity?
- #text_link_entity?
- #text_mention_entity?
- #underline_entity?
- #update_action : UpdateAction
- #update_entity?
-
#update_id : Int32
The update's unique identifier.
-
#update_id=(update_id : Int32)
The update's unique identifier.
- #url_entity?
- #user_message_entity?
- #venue_entity?
- #via_bot_entity?
- #video_entity?
- #video_note_entity?
- #voice_chat_ended_entity?
- #voice_chat_participants_invited_entity?
- #voice_chat_scheduled_entity?
- #voice_chat_started_entity?
- #voice_entity?
Instance methods inherited from class Telegram::API::Type
==(other)
==,
client
client
Constructor methods inherited from class Telegram::API::Type
new(pull : JSON::PullParser)
new
Constructor Detail
This object represents an incoming update.At most one of the optional parameters can be present in any given update.
Instance Method Detail
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 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 message of any kind - text, photo, sticker, etc.
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. 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. 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.