class Tourmaline::Update

Overview

This object represents a Telegram user or bot.

Included Modules

Defined in:

tourmaline/models/update.cr

Constructors

Instance Method Summary

Instance methods inherited from module Tourmaline::Model

client : Tourmaline::Client client, client=(client : Tourmaline::Client) client=, client? : Tourmaline::Client | Nil client?, finish_init(client : Tourmaline::Client) finish_init

Constructor Detail

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

[View source]

Instance Method Detail

def animation? #

[View source]
def anonymous_admin_message? #

[View source]
def audio? #

[View source]
def basketball? #

[View source]
def bold_entity? #

[View source]
def bot_command_entity? #

[View source]
def bot_message? #

[View source]
def bowling? #

[View source]
def callback_query : CallbackQuery | Nil #

Optional. New incoming callback query


[View source]
def callback_query? #

[View source]
def caption? #

[View source]
def cashtag_entity? #

[View source]
def channel_chat_created? #

[View source]
def channel_forward_message? #

[View source]
def channel_message? #

[View source]
def channel_post : Message | Nil #

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


[View source]
def channel_post? #

[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_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? #

[View source]
def chats #

Returns all unique chats included in this update


[View source]
def chats(&block : Chat -> ) #

Yields each unique chat in this update to the block.


[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? #

[View source]
def code_entity? #

[View source]
def connected_website? #

[View source]
def contact? #

[View source]
def context : Middleware::Context #

[View source]
def dart? #

[View source]
def delete_chat_photo? #

[View source]
def dice? #

[View source]
def document? #

[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? #

[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? #

[View source]
def email_entity? #

[View source]
def football? #

[View source]
def forum_topic_closed? #

[View source]
def forum_topic_created? #

[View source]
def forum_topic_reopened? #

[View source]
def forwarded_message? #

[View source]
def game? #

[View source]
def group_chat_created? #

[View source]
def hashtag_entity? #

[View source]
def inline_query : InlineQuery | Nil #

Optional. New incoming inline query


[View source]
def inline_query? #

[View source]
def invoice? #

[View source]
def italic_entity? #

[View source]
def left_chat_member? #

[View source]
def location? #

[View source]
def media_group? #

[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? #

[View source]
def message_auto_delete_timer_changed? #

[View source]
def migrate_from_chat_id? #

[View source]
def migrate_to_chat_id? #

[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? #

[View source]
def new_chat_members? #

[View source]
def new_chat_photo? #

[View source]
def new_chat_title? #

[View source]
def passport_data? #

[View source]
def phone_number_entity? #

[View source]
def photo? #

[View source]
def pinned_message? #

[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? #

[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? #

[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? #

[View source]
def pre_entity? #

[View source]
def proximity_alert_triggered? #

[View source]
def reply_markup? #

[View source]
def reply_message? #

[View source]
def shipping_query : ShippingQuery | Nil #

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


[View source]
def shipping_query? #

[View source]
def slot_machine? #

[View source]
def soccerball? #

[View source]
def spoiler_entity? #

[View source]
def sticker? #

[View source]
def strikethrough_entity? #

[View source]
def successful_payment? #

[View source]
def supergroup_chat_created? #

[View source]
def text? #

[View source]
def text_link_entity? #

[View source]
def text_mention_entity? #

[View source]
def thread_message? #

[View source]
def underline_entity? #

[View source]
def update? #

[View source]
def update_actions : Array(UpdateAction) #

[View source]
def update_id : Int64 #

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? #

[View source]
def users #

Returns all users included in this update as a Set


[View source]
def users(&block : User -> ) #

Yields each unique user in this update to the block.


[View source]
def venue? #

[View source]
def via_bot? #

[View source]
def video? #

[View source]
def video_chat_ended? #

[View source]
def video_chat_participants_invited? #

[View source]
def video_chat_scheduled? #

[View source]
def video_chat_started? #

[View source]
def video_note? #

[View source]
def voice? #

[View source]
def web_app_data? #

[View source]