class Tourmaline::Message

Overview

This object represents a Telegram user or bot.

Included Modules

Defined in:

tourmaline/extra/paginated_keyboard.cr
tourmaline/extra/routed_menu.cr
tourmaline/models/message.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 : Animation | Nil #

[View source]
def audio : Audio | Nil #

[View source]
def author_signature : String | Nil #

[View source]
def automatic_forward? : Bool | Nil #

[View source]
def caption : String | Nil #

[View source]
def caption_entities : Array(MessageEntity) #

[View source]
def channel_chat_created : Bool | Nil #

[View source]
def chat : Chat #

[View source]
def chats #

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

[View source]
def connected_website : String | Nil #

[View source]
def contact : Contact | Nil #

[View source]
def date : Time #

[View source]
def delete #

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


[View source]
def delete_chat_photo : Bool | Nil #

[View source]
def dice : Dice | Nil #

[View source]
def document : Document | Nil #

[View source]
def edit_caption(caption, **kwargs) #

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


[View source]
def edit_date : Time | Nil #

[View source]
def edit_live_location(latitude, longitude, **kwargs) #

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


[View source]
def edit_media(media, **kwargs) #

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


[View source]
def edit_reply_markup(reply_markup) #

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


[View source]
def edit_text(text, **kwargs) #

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


[View source]
def entities : Array(MessageEntity) #

[View source]
def file #

[View source]
def forum_topic_closed : ForumTopicClosed | Nil #

[View source]
def forum_topic_created : ForumTopicCreated | Nil #

[View source]
def forum_topic_reopened : ForumTopicReopened | Nil #

[View source]
def forward(to_chat, **kwargs) #

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


[View source]
def forward_date : Time | Nil #

[View source]
def forward_from : User | Nil #

[View source]
def forward_from_chat : Chat | Nil #

[View source]
def forward_from_message_id : Int64 | Nil #

[View source]
def forward_sender_name : String | Nil #

[View source]
def forward_signature : String | Nil #

[View source]
def forwards : Int32 | Nil #

USER API ONLY


[View source]
def from : User | Nil #

[View source]
def game : Game | Nil #

[View source]
def group_chat_created : Bool | Nil #

[View source]
def has_media_spoiler? : Bool | Nil #

[View source]
def has_protected_content? : Bool | Nil #

[View source]
def invoice : Invoice | Nil #

[View source]
def left_chat_member : User | Nil #

[View source]
def link #

[View source]
def location : Location | Nil #

[View source]
def media_group_id : String | Nil #

[View source]
def message_auto_delete_timer_changed : MessageAutoDeleteTimerChanged | Nil #

[View source]
def message_id : Int64 #

[View source]
def message_thread_id : Int64 | Nil #

[View source]
def migrate_from_chat_id : Int64 | Nil #

[View source]
def migrate_to_chat_id : Int64 | Nil #

[View source]
def new_chat_members : Array(User) #

[View source]
def new_chat_photo : Array(PhotoSize) #

[View source]
def new_chat_title : String | Nil #

[View source]
def outgoing? : Bool | Nil #

USER API ONLY


[View source]
def passport_data : PassportData | Nil #

[View source]
def photo : Array(PhotoSize) #

[View source]
def pin(**kwargs) #

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


[View source]
def pinned_message : Message | Nil #

[View source]
def poll : Poll | Nil #

[View source]
def proximity_alert_triggered : ProximityAlertTriggered | Nil #

[View source]
def raw_caption(parse_mode : ParseMode = :markdown, escape : Bool = false) #

[View source]
def raw_text(parse_mode : ParseMode = :markdown, escape : Bool = false) #

[View source]
def reply(message, **kwargs) #

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


[View source]
def reply_markup : InlineKeyboardMarkup | Nil #

[View source]
def reply_message : Message | Nil #

[View source]
def reply_with_animation(*args, **kwargs) #

[View source]
def reply_with_audio(*args, **kwargs) #

[View source]
def reply_with_basketball(*args, **kwargs) #

[View source]
def reply_with_contact(*args, **kwargs) #

[View source]
def reply_with_dart(*args, **kwargs) #

[View source]
def reply_with_dice(*args, **kwargs) #

[View source]
def reply_with_document(*args, **kwargs) #

[View source]
def reply_with_invoice(*args, **kwargs) #

[View source]
def reply_with_location(*args, **kwargs) #

[View source]
def reply_with_media_group(*args, **kwargs) #

[View source]
def reply_with_menu(menu : RoutedMenu, **kwargs) #

[View source]
def reply_with_paginated_keyboard(keyboard : PaginatedKeyboard, **kwargs) #

[View source]
def reply_with_photo(*args, **kwargs) #

[View source]
def reply_with_poll(*args, **kwargs) #

[View source]
def reply_with_sticker(*args, **kwargs) #

[View source]
def reply_with_venu(*args, **kwargs) #

[View source]
def reply_with_video(*args, **kwargs) #

[View source]
def reply_with_video_note(*args, **kwargs) #

[View source]
def reply_with_voice(*args, **kwargs) #

[View source]
def respond(message, **kwargs) #

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


[View source]
def respond_with_animation(*args, **kwargs) #

[View source]
def respond_with_audio(*args, **kwargs) #

[View source]
def respond_with_basketball(*args, **kwargs) #

[View source]
def respond_with_contact(*args, **kwargs) #

[View source]
def respond_with_dart(*args, **kwargs) #

[View source]
def respond_with_dice(*args, **kwargs) #

[View source]
def respond_with_document(*args, **kwargs) #

[View source]
def respond_with_invoice(*args, **kwargs) #

[View source]
def respond_with_location(*args, **kwargs) #

[View source]
def respond_with_media_group(*args, **kwargs) #

[View source]
def respond_with_menu(menu : RoutedMenu, **kwargs) #

[View source]
def respond_with_paginated_keyboard(keyboard : PaginatedKeyboard, **kwargs) #

[View source]
def respond_with_photo(*args, **kwargs) #

[View source]
def respond_with_poll(*args, **kwargs) #

[View source]
def respond_with_sticker(*args, **kwargs) #

[View source]
def respond_with_venu(*args, **kwargs) #

[View source]
def respond_with_video(*args, **kwargs) #

[View source]
def respond_with_video_note(*args, **kwargs) #

[View source]
def respond_with_voice(*args, **kwargs) #

[View source]
def sender_chat : Chat | Nil #

[View source]
def sender_type #

[View source]
def sticker : Sticker | Nil #

[View source]
def stop_live_location(**kwargs) #

[View source]
def successful_payment : SuccessfulPayment | Nil #

[View source]
def supergroup_chat_created : Bool | Nil #

[View source]
def text : String | Nil #

[View source]
def text_entities #

[View source]
def topic_message? : Bool | Nil #

[View source]
def unpin(**kwargs) #

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


[View source]
def users #

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

[View source]
def venue : Venue | Nil #

[View source]
def via_bot : User | Nil #

[View source]
def video : Video | Nil #

[View source]
def video_chat_ended : VideoChatEnded | Nil #

[View source]
def video_chat_participants_invited : VideoChatParticipantsInvited | Nil #

[View source]
def video_chat_scheduled : VideoChatScheduled | Nil #

[View source]
def video_chat_started : VideoChatStarted | Nil #

[View source]
def video_note : VideoNote | Nil #

[View source]
def views : Int32 | Nil #

USER API ONLY


[View source]
def voice : Voice | Nil #

[View source]
def web_app_data : WebAppData | Nil #

[View source]