class TelegramApi::Types::Message

Included Modules

Defined in:

telegram_api/src/types/message.cr

Constructors

Instance Method Summary

Constructor Detail

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

[View source]

Instance Method Detail

def author_signature : String | Nil #

Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator


[View source]
def business_connection_id : String | Nil #

Optional. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier.


[View source]
def chat : Chat #

Chat the message belongs to


[View source]
def date : Int64 #

Date the message was sent in Unix time. It is always a positive number, representing a valid date.


[View source]
def edit_date : Int64 | Nil #

Optional. Date the message was last edited in Unix time


[View source]
def from : User | Nil #

Optional. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats


[View source]
def has_protected_content : Bool | Nil #

Optional. Bool, if the message can't be forwarded


[View source]
def is_from_offline : Bool | Nil #

Optional. Bool, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message


[View source]
def media_group_id : String | Nil #

Optional. The unique identifier of a media message group this message belongs to


[View source]
def message_id : Int64 #

Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent


[View source]
def message_thread_id : Int64 | Nil #

Optional. Unique identifier of a message thread to which the message belongs; for supergroups only


[View source]
def reply_to_message : Message | Nil #

Optional. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.


[View source]
def sender_boost_count : Int64 | Nil #

Optional. If the sender of the message boosted the chat, the number of boosts added by the user


[View source]
def sender_business_bot : User | Nil #

Optional. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account.


[View source]
def sender_chat : Chat | Nil #

Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats.


[View source]
def text : String | Nil #

Optional. For text messages, the actual UTF-8 text of the message


[View source]
def via_bot : User | Nil #

Optional. Bot through which the message was sent


[View source]