Class: TD::Types::Message

Inherits:
Base
  • Object
show all
Defined in:
lib/tdlib/types/message.rb

Overview

Describes a message.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#author_signatureTD::Types::String?

For channel posts and anonymous group messages, optional author signature.

Returns:

  • (TD::Types::String, nil)

    the current value of author_signature



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def author_signature
  @author_signature
end

#auto_delete_inFloat

Time left before the message will be automatically deleted by message_auto_delete_time setting of the chat, in seconds; 0 if never.

Returns:

  • (Float)

    the current value of auto_delete_in



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def auto_delete_in
  @auto_delete_in
end

#can_be_savedBoolean

True, if content of the message can be saved locally or copied.

Returns:

  • (Boolean)

    the current value of can_be_saved



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def can_be_saved
  @can_be_saved
end

#chat_idInteger

Chat identifier.

Returns:

  • (Integer)

    the current value of chat_id



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def chat_id
  @chat_id
end

#contains_unread_mentionBoolean

True, if the message contains an unread mention for the current user.

Returns:

  • (Boolean)

    the current value of contains_unread_mention



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def contains_unread_mention
  @contains_unread_mention
end

#contentTD::Types::MessageContent

Content of the message.

Returns:



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def content
  @content
end

#dateInteger

Point in time (Unix timestamp) when the message was sent.

Returns:

  • (Integer)

    the current value of date



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def date
  @date
end

#edit_dateInteger

Point in time (Unix timestamp) when the message was last edited.

Returns:

  • (Integer)

    the current value of edit_date



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def edit_date
  @edit_date
end

#effect_idInteger

Unique identifier of the effect added to the message; 0 if none.

Returns:

  • (Integer)

    the current value of effect_id



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def effect_id
  @effect_id
end

#fact_checkTD::Types::FactCheck?

Information about fact-check added to the message; may be null if none.

Returns:



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def fact_check
  @fact_check
end

#forward_infoTD::Types::MessageForwardInfo?

Information about the initial message sender; may be null if none or unknown.

Returns:



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def forward_info
  @forward_info
end

#has_sensitive_contentBoolean

True, if media content of the message must be hidden with 18+ spoiler.

Returns:

  • (Boolean)

    the current value of has_sensitive_content



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def has_sensitive_content
  @has_sensitive_content
end

#has_timestamped_mediaBoolean

True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message.

Returns:

  • (Boolean)

    the current value of has_timestamped_media



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def has_timestamped_media
  @has_timestamped_media
end

#idInteger

Message identifier; unique for the chat to which the message belongs.

Returns:

  • (Integer)

    the current value of id



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def id
  @id
end

#import_infoTD::Types::MessageImportInfo?

Information about the initial message for messages created with importMessages; may be null if the message isn’t imported.

Returns:



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def import_info
  @import_info
end

#interaction_infoTD::Types::MessageInteractionInfo?

Information about interactions with the message; may be null if none.

Returns:



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def interaction_info
  @interaction_info
end

#is_channel_postBoolean

True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts.

Returns:

  • (Boolean)

    the current value of is_channel_post



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def is_channel_post
  @is_channel_post
end

#is_from_offlineBoolean

True, if the message was sent because of a scheduled action by the message sender, for example, as away, or greeting service message.

Returns:

  • (Boolean)

    the current value of is_from_offline



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def is_from_offline
  @is_from_offline
end

#is_outgoingBoolean

True, if the message is outgoing.

Returns:

  • (Boolean)

    the current value of is_outgoing



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def is_outgoing
  @is_outgoing
end

#is_pinnedBoolean

True, if the message is pinned.

Returns:

  • (Boolean)

    the current value of is_pinned



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def is_pinned
  @is_pinned
end

#is_topic_messageBoolean

True, if the message is a forum topic message.

Returns:

  • (Boolean)

    the current value of is_topic_message



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def is_topic_message
  @is_topic_message
end

#media_album_idInteger

Unique identifier of an album this message belongs to; 0 if none. Only audios, documents, photos and videos can be grouped together in albums.

Returns:

  • (Integer)

    the current value of media_album_id



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def media_album_id
  @media_album_id
end

#message_thread_idInteger

If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs.

Returns:

  • (Integer)

    the current value of message_thread_id



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def message_thread_id
  @message_thread_id
end

#reply_markupTD::Types::ReplyMarkup?

Reply markup for the message; may be null if none.

Returns:



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def reply_markup
  @reply_markup
end

#reply_toTD::Types::MessageReplyTo?

Information about the message or the story this message is replying to; may be null if none.

Returns:



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def reply_to
  @reply_to
end

#restriction_reasonTD::Types::String

If non-empty, contains a human-readable description of the reason why access to this message must be restricted.

Returns:

  • (TD::Types::String)

    the current value of restriction_reason



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def restriction_reason
  @restriction_reason
end

#saved_messages_topic_idInteger

Identifier of the Saved Messages topic for the message; 0 for messages not from Saved Messages.

Returns:

  • (Integer)

    the current value of saved_messages_topic_id



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def saved_messages_topic_id
  @saved_messages_topic_id
end

#scheduling_stateTD::Types::MessageSchedulingState?

The scheduling state of the message; may be null if the message isn’t scheduled.

Returns:



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def scheduling_state
  @scheduling_state
end

#self_destruct_inFloat

Time left before the message self-destruct timer expires, in seconds; 0 if self-destruction isn’t scheduled yet.

Returns:

  • (Float)

    the current value of self_destruct_in



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def self_destruct_in
  @self_destruct_in
end

#self_destruct_typeTD::Types::MessageSelfDestructType?

The message’s self-destruct type; may be null if none.

Returns:



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def self_destruct_type
  @self_destruct_type
end

#sender_boost_countInteger

Number of times the sender of the message boosted the supergroup at the time the message was sent; 0 if none or unknown. For messages sent by the current user, supergroupFullInfo.my_boost_count must be used instead.

Returns:

  • (Integer)

    the current value of sender_boost_count



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def sender_boost_count
  @sender_boost_count
end

#sender_business_bot_user_idInteger

If non-zero, the user identifier of the business bot that sent this message.

Returns:

  • (Integer)

    the current value of sender_business_bot_user_id



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def sender_business_bot_user_id
  @sender_business_bot_user_id
end

#sender_idTD::Types::MessageSender

Identifier of the sender of the message.

Returns:



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def sender_id
  @sender_id
end

#sending_stateTD::Types::MessageSendingState?

The sending state of the message; may be null if the message isn’t being sent and didn’t fail to be sent.

Returns:



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def sending_state
  @sending_state
end

#unread_reactionsArray<TD::Types::UnreadReaction>

Information about unread reactions added to the message.

Returns:



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def unread_reactions
  @unread_reactions
end

#via_bot_user_idInteger

If non-zero, the user identifier of the inline bot through which this message was sent.

Returns:

  • (Integer)

    the current value of via_bot_user_id



62
63
64
# File 'lib/tdlib/types/message.rb', line 62

def via_bot_user_id
  @via_bot_user_id
end