Skip to content

Message

class Tourmaline::Message
inherits Reference #

This object represents a Telegram user or bot.##

Included modules#

JSON::Serializable Tourmaline::Model

Class methods#

.new(pull : JSON::PullParser) #

Methods#

#animation : Animation? #

#audio : Audio? #

#author_signature : String? #

#caption : String? #

#caption_entities : Array(MessageEntity) #

#channel_chat_created : Bool? #

#chat : Chat #

#chats #

#chats(&block : Chat -> ) #

#connected_website : String? #

#contact : Contact? #

#date : Time #

#delete #

Delete the message. See Tourmaline::Client#delete_message.

#delete_chat_photo : Bool? #

#dice : Dice? #

#document : Document? #

#edit_caption(caption, **kwargs) #

Edits the message's caption. See Tourmaline::Client#edit_message_caption

#edit_date : Time? #

#edit_live_location(latitude, longitude, **kwargs) #

Edits the message's live_location. See Tourmaline::Client#edit_message_live_location

#edit_media(media, **kwargs) #

Edits the message's media. See Tourmaline::Client#edit_message_media

#edit_reply_markup(reply_markup) #

Set the reply markup for the message. See Tourmaline::Client#edit_message_reply_markup.

#edit_text(text, **kwargs) #

Edits the text of a message. See Tourmaline::Client#edit_message_text.

#entities : Array(MessageEntity) #

#forward(to_chat, **kwargs) #

Forward the message to another chat. See Tourmaline::Client#forward_message.

#forward_date : Time? #

#forward_from : User? #

#forward_from_chat : Chat? #

#forward_from_message_id : Int64? #

#forward_sender_name : String? #

#forward_signature : String? #

#from : User? #

#game : Game? #

#group_chat_created : Bool? #

#invoice : Invoice? #

#left_chat_member : User? #

#link #

#location : Location? #

#media_group_id : String? #

#message_id : Int64 #

#migrate_from_chat_id : Int64? #

#migrate_to_chat_id : Int64? #

#new_chat_members : Array(User) #

#new_chat_photo : Array(PhotoSize) #

#new_chat_title : String? #

#passport_data : PassportData? #

#photo : Array(PhotoSize) #

#pin(**kwargs) #

Pin the message. See Tourmaline::Client#pin_chat_message.

#pinned_message : Message? #

#poll : Poll? #

#proximity_alert_triggered : ProximityAlertTriggered? #

#raw_caption(parse_mode : ParseMode = :markdown) #

#raw_text(parse_mode : ParseMode = :markdown) #

#reply(message, **kwargs) #

Reply to a message. See Tourmaline::Client#send_message.

#reply_markup : InlineKeyboardMarkup? #

#reply_message : Message? #

#reply_with_animation(*args, **kwargs) #

#reply_with_audio(*args, **kwargs) #

#reply_with_basketball(*args, **kwargs) #

#reply_with_contact(*args, **kwargs) #

#reply_with_dart(*args, **kwargs) #

#reply_with_dice(*args, **kwargs) #

#reply_with_document(*args, **kwargs) #

#reply_with_invoice(*args, **kwargs) #

#reply_with_location(*args, **kwargs) #

#reply_with_media_group(*args, **kwargs) #

#reply_with_menu(menu : RoutedMenu, **kwargs) #

#reply_with_photo(*args, **kwargs) #

#reply_with_poll(*args, **kwargs) #

#reply_with_venu(*args, **kwargs) #

#reply_with_video(*args, **kwargs) #

#reply_with_video_note(*args, **kwargs) #

#reply_with_voice(*args, **kwargs) #

#respond(message, **kwargs) #

Respond to a message. See Tourmaline::Client#send_message.

#respond_with_animation(*args, **kwargs) #

#respond_with_audio(*args, **kwargs) #

#respond_with_basketball(*args, **kwargs) #

#respond_with_contact(*args, **kwargs) #

#respond_with_dart(*args, **kwargs) #

#respond_with_dice(*args, **kwargs) #

#respond_with_document(*args, **kwargs) #

#respond_with_invoice(*args, **kwargs) #

#respond_with_location(*args, **kwargs) #

#respond_with_media_group(*args, **kwargs) #

#respond_with_menu(menu : RoutedMenu, **kwargs) #

#respond_with_photo(*args, **kwargs) #

#respond_with_poll(*args, **kwargs) #

#respond_with_venu(*args, **kwargs) #

#respond_with_video(*args, **kwargs) #

#respond_with_video_note(*args, **kwargs) #

#respond_with_voice(*args, **kwargs) #

#sender_chat : Chat? #

#sticker : Sticker? #

#stop_live_location(**kwargs) #

#successful_payment : SuccessfulPayment? #

#supergroup_chat_created : Bool? #

#text : String? #

#text_entities #

#unpin(**kwargs) #

Unpin the message. See Tourmaline::Client#unpin_chat_message.

#users #

#users(&block : User -> ) #

#venue : Venue? #

#via_bot : User? #

#video : Video? #

#video_note : VideoNote? #

#voice : Voice? #