class Telegram::API::Update

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.cr
telegram/api/overrides/update.cr

Constructors

Instance Method Summary

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

def self.new(pull : JSON::PullParser) #

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


[View source]
def self.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) #

[View source]

Instance Method Detail

def all_entity? #

[View source]
def animation_entity? #

[View source]
def anonymous_admin_message_entity? #

[View source]
def audio_entity? #

[View source]
def basketball_entity? #

[View source]
def bold_entity? #

[View source]
def bot_command_entity? #

[View source]
def bot_message_entity? #

[View source]
def bowling_entity? #

[View source]
def callback_query : CallbackQuery | Nil #

Optional. New incoming callback query


[View source]
def callback_query=(callback_query : CallbackQuery | Nil) #

Optional. New incoming callback query


[View source]
def callback_query_entity? #

[View source]
def caption_entity? #

[View source]
def cashtag_entity? #

[View source]
def channel_chat_created_entity? #

[View source]
def channel_forward_message_entity? #

[View source]
def channel_message_entity? #

[View source]
def channel_post : Message | Nil #

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


[View source]
def channel_post=(channel_post : Message | Nil) #

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


[View source]
def channel_post_entity? #

[View source]
def chat_join_request : ChatJoinRequest | Nil #

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]
def chat_join_request=(chat_join_request : ChatJoinRequest | Nil) #

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]
def chat_member : ChatMemberUpdated | Nil #

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]
def chat_member=(chat_member : ChatMemberUpdated | Nil) #

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]
def chat_member_entity? #

[View source]
def chosen_inline_result : ChosenInlineResult | Nil #

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]
def chosen_inline_result=(chosen_inline_result : ChosenInlineResult | Nil) #

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]
def chosen_inline_result_entity? #

[View source]
def code_entity? #

[View source]
def connected_website_entity? #

[View source]
def contact_entity? #

[View source]
def dart_entity? #

[View source]
def delete_chat_photo_entity? #

[View source]
def dice_entity? #

[View source]
def document_entity? #

[View source]
def edited_channel_post : Message | Nil #

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


[View source]
def edited_channel_post=(edited_channel_post : Message | Nil) #

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


[View source]
def edited_channel_post_entity? #

[View source]
def edited_message : Message | Nil #

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


[View source]
def edited_message=(edited_message : Message | Nil) #

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


[View source]
def edited_message_entity? #

[View source]
def email_entity? #

[View source]
def football_entity? #

[View source]
def forwarded_message_entity? #

[View source]
def game_entity? #

[View source]
def group_chat_created_entity? #

[View source]
def hashtag_entity? #

[View source]
def inline_query : InlineQuery | Nil #

Optional. New incoming inline query


[View source]
def inline_query=(inline_query : InlineQuery | Nil) #

Optional. New incoming inline query


[View source]
def inline_query_entity? #

[View source]
def invoice_entity? #

[View source]
def italic_entity? #

[View source]
def left_chat_member_entity? #

[View source]
def location_entity? #

[View source]
def media_group_entity? #

[View source]
def mention_entity? #

[View source]
def message : Message | Nil #

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


[View source]
def message=(message : Message | Nil) #

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


[View source]
def message_auto_delete_timer_changed_entity? #

[View source]
def message_entity? #

[View source]
def migrate_from_chat_id_entity? #

[View source]
def migrate_to_chat_id_entity? #

[View source]
def my_chat_member : ChatMemberUpdated | Nil #

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]
def my_chat_member=(my_chat_member : ChatMemberUpdated | Nil) #

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]
def my_chat_member_entity? #

[View source]
def new_chat_members_entity? #

[View source]
def new_chat_photo_entity? #

[View source]
def new_chat_title_entity? #

[View source]
def none_entity? #

[View source]
def passport_data_entity? #

[View source]
def phone_number_entity? #

[View source]
def photo_entity? #

[View source]
def pinned_message_entity? #

[View source]
def poll : Poll | Nil #

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


[View source]
def poll=(poll : Poll | Nil) #

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


[View source]
def poll_answer : PollAnswer | Nil #

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]
def poll_answer=(poll_answer : PollAnswer | Nil) #

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]
def poll_answer_entity? #

[View source]
def poll_entity? #

[View source]
def pre_checkout_query : PreCheckoutQuery | Nil #

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


[View source]
def pre_checkout_query=(pre_checkout_query : PreCheckoutQuery | Nil) #

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


[View source]
def pre_checkout_query_entity? #

[View source]
def pre_entity? #

[View source]
def proximity_alert_triggered_entity? #

[View source]
def reply_markup_entity? #

[View source]
def reply_message_entity? #

[View source]
def shipping_query : ShippingQuery | Nil #

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


[View source]
def shipping_query=(shipping_query : ShippingQuery | Nil) #

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


[View source]
def shipping_query_entity? #

[View source]
def slot_machine_entity? #

[View source]
def soccerball_entity? #

[View source]
def spoiler_entity? #

[View source]
def sticker_entity? #

[View source]
def strikethrough_entity? #

[View source]
def successful_payment_entity? #

[View source]
def supergroup_chat_created_entity? #

[View source]
def text_entity? #

[View source]
def text_link_entity? #

[View source]
def text_mention_entity? #

[View source]
def underline_entity? #

[View source]
def update_action : UpdateAction #

[View source]
def update_entity? #

[View source]
def update_id : Int32 #

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]
def update_id=(update_id : Int32) #

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]
def url_entity? #

[View source]
def user_message_entity? #

[View source]
def venue_entity? #

[View source]
def via_bot_entity? #

[View source]
def video_entity? #

[View source]
def video_note_entity? #

[View source]
def voice_chat_ended_entity? #

[View source]
def voice_chat_participants_invited_entity? #

[View source]
def voice_chat_scheduled_entity? #

[View source]
def voice_chat_started_entity? #

[View source]
def voice_entity? #

[View source]