class Hamilton::Types::Update

Overview

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

Included Modules

Defined in:

types/update.cr

Constructors

Instance Method Summary

Instance methods inherited from class Reference

==(other : Hamilton::Any) ==

Instance methods inherited from class Object

===(other : Hamilton::Any) ===

Constructor Detail

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

def self.new(params) #

def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

def self.new(**params) #

Instance Method Detail

def business_connection : Hamilton::Types::BusinessConnection | Nil #

The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot.


def business_connection=(business_connection : Hamilton::Types::BusinessConnection | Nil) #

The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot.


def business_message : Hamilton::Types::Message | Nil #

New message from a connected business account.


def business_message=(business_message : Hamilton::Types::Message | Nil) #

New message from a connected business account.


def callback_query : Hamilton::Types::CallbackQuery | Nil #

New incoming callback query.


def callback_query=(callback_query : Hamilton::Types::CallbackQuery | Nil) #

New incoming callback query.


def channel_post : Hamilton::Types::Message | Nil #

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


def channel_post=(channel_post : Hamilton::Types::Message | Nil) #

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


def chat_boost : Hamilton::Types::ChatBoostUpdated | Nil #

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


def chat_boost=(chat_boost : Hamilton::Types::ChatBoostUpdated | Nil) #

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


def chat_join_request : Hamilton::Types::ChatJoinRequest | Nil #

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.


def chat_join_request=(chat_join_request : Hamilton::Types::ChatJoinRequest | Nil) #

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.


def chat_member : Hamilton::Types::ChatMemberUpdated | Nil #

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.


def chat_member=(chat_member : Hamilton::Types::ChatMemberUpdated | Nil) #

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.


def chosen_inline_result : Hamilton::Types::ChosenInlineResult | Nil #

The result of an inline query that was chosen by a user and sent to their chat partner.


def chosen_inline_result=(chosen_inline_result : Hamilton::Types::ChosenInlineResult | Nil) #

The result of an inline query that was chosen by a user and sent to their chat partner.


def deleted_business_messages : Hamilton::Types::BusinessMessagesDeleted | Nil #

Messages were deleted from a connected business account.


def deleted_business_messages=(deleted_business_messages : Hamilton::Types::BusinessMessagesDeleted | Nil) #

Messages were deleted from a connected business account.


def edited_business_message : Hamilton::Types::Message | Nil #

New version of a message from a connected business account.


def edited_business_message=(edited_business_message : Hamilton::Types::Message | Nil) #

New version of a message from a connected business account.


def edited_channel_post : Hamilton::Types::Message | Nil #

New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.


def edited_channel_post=(edited_channel_post : Hamilton::Types::Message | Nil) #

New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.


def edited_message : Hamilton::Types::Message | Nil #

New version of a message that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.


def edited_message=(edited_message : Hamilton::Types::Message | Nil) #

New version of a message that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.


def inline_query : Hamilton::Types::InlineQuery | Nil #

New incoming inline query.


def inline_query=(inline_query : Hamilton::Types::InlineQuery | Nil) #

New incoming inline query.


def message : Hamilton::Types::Message | Nil #

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


def message=(message : Hamilton::Types::Message | Nil) #

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


def message_reaction : Hamilton::Types::MessageReactionUpdated | Nil #

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.


def message_reaction=(message_reaction : Hamilton::Types::MessageReactionUpdated | Nil) #

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.


def message_reaction_count : Hamilton::Types::MessageReactionCountUpdated | Nil #

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.


def message_reaction_count=(message_reaction_count : Hamilton::Types::MessageReactionCountUpdated | Nil) #

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.


def my_chat_member : Hamilton::Types::ChatMemberUpdated | Nil #

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.


def my_chat_member=(my_chat_member : Hamilton::Types::ChatMemberUpdated | Nil) #

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.


def non_nil_fields : Array(String) #

List of available non-nil fields.


def non_nil_fields=(non_nil_fields : Array(String)) #

List of available non-nil fields.


def poll : Hamilton::Types::Poll | Nil #

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


def poll=(poll : Hamilton::Types::Poll | Nil) #

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


def poll_answer : Hamilton::Types::PollAnswer | Nil #

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


def poll_answer=(poll_answer : Hamilton::Types::PollAnswer | Nil) #

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


def pre_checkout_query : Hamilton::Types::PreCheckoutQuery | Nil #

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


def pre_checkout_query=(pre_checkout_query : Hamilton::Types::PreCheckoutQuery | Nil) #

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


def purchased_paid_media : Hamilton::Types::PaidMediaPurchased | Nil #

A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat.


def purchased_paid_media=(purchased_paid_media : Hamilton::Types::PaidMediaPurchased | Nil) #

A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat.


def removed_chat_boost : Hamilton::Types::ChatBoostRemoved | Nil #

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


def removed_chat_boost=(removed_chat_boost : Hamilton::Types::ChatBoostRemoved | Nil) #

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


def shipping_query : Hamilton::Types::ShippingQuery | Nil #

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


def shipping_query=(shipping_query : Hamilton::Types::ShippingQuery | Nil) #

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


def update_id : Int32 #

The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially.


def update_id=(update_id : Int32) #

The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially.