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_signature ⇒ String?

For channel posts, optional author signature.

Returns:

  • (String, nil) —

    the current value of author_signature



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def author_signature
  @author_signature
end

#can_be_deleted_for_all_users ⇒ Boolean

True, if the message can be deleted for all users.

Returns:

  • (Boolean) —

    the current value of can_be_deleted_for_all_users



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def can_be_deleted_for_all_users
  @can_be_deleted_for_all_users
end

#can_be_deleted_only_for_self ⇒ Boolean

True, if the message can be deleted only for the current user while other users will continue to see it.

Returns:

  • (Boolean) —

    the current value of can_be_deleted_only_for_self



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def can_be_deleted_only_for_self
  @can_be_deleted_only_for_self
end

#can_be_edited ⇒ Boolean

True, if the message can be edited. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message by the client.

Returns:

  • (Boolean) —

    the current value of can_be_edited



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def can_be_edited
  @can_be_edited
end

#can_be_forwarded ⇒ Boolean

True, if the message can be forwarded.

Returns:

  • (Boolean) —

    the current value of can_be_forwarded



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def can_be_forwarded
  @can_be_forwarded
end

#chat_id ⇒ Integer

Chat identifier.

Returns:

  • (Integer) —

    the current value of chat_id



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def chat_id
  @chat_id
end

#contains_unread_mention ⇒ Boolean

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

Returns:

  • (Boolean) —

    the current value of contains_unread_mention



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def contains_unread_mention
  @contains_unread_mention
end

#content ⇒ TD::Types::MessageContent

Content of the message.

Returns:



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def content
  @content
end

#date ⇒ Integer

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

Returns:

  • (Integer) —

    the current value of date



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def date
  @date
end

#edit_date ⇒ Integer

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

Returns:

  • (Integer) —

    the current value of edit_date



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def edit_date
  @edit_date
end

#forward_info ⇒ TD::Types::MessageForwardInfo?

Information about the initial message sender; may be null.

Returns:



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def forward_info
  @forward_info
end

#id ⇒ Integer

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

Returns:

  • (Integer) —

    the current value of id



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def id
  @id
end

#is_channel_post ⇒ Boolean

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



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def is_channel_post
  @is_channel_post
end

#is_outgoing ⇒ Boolean

True, if the message is outgoing.

Returns:

  • (Boolean) —

    the current value of is_outgoing



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def is_outgoing
  @is_outgoing
end

#media_album_id ⇒ Integer

Unique identifier of an album this message belongs to. Only photos and videos can be grouped together in albums.

Returns:

  • (Integer) —

    the current value of media_album_id



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def media_album_id
  @media_album_id
end

#reply_markup ⇒ TD::Types::ReplyMarkup?

Reply markup for the message; may be null.

Returns:



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def reply_markup
  @reply_markup
end

#reply_to_message_id ⇒ Integer

If non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message.

Returns:

  • (Integer) —

    the current value of reply_to_message_id



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def reply_to_message_id
  @reply_to_message_id
end

#restriction_reason ⇒ String

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

Returns:

  • (String) —

    the current value of restriction_reason



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def restriction_reason
  @restriction_reason
end

#scheduling_state ⇒ TD::Types::MessageSchedulingState?

Information about the scheduling state of the message; may be null.

Returns:



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def scheduling_state
  @scheduling_state
end

#sender_user_id ⇒ Integer

Identifier of the user who sent the message; 0 if unknown. Currently, it is unknown for channel posts and for channel posts automatically forwarded to discussion group.

Returns:

  • (Integer) —

    the current value of sender_user_id



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def sender_user_id
  @sender_user_id
end

#sending_state ⇒ TD::Types::MessageSendingState?

Information about the sending state of the message; may be null.

Returns:



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def sending_state
  @sending_state
end

#ttl ⇒ Integer

For self-destructing messages, the message's TTL (Time To Live), in seconds; 0 if none. TDLib will send Update::DeleteMessages or Update::MessageContent once the TTL expires.

Returns:

  • (Integer) —

    the current value of ttl



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def ttl
  @ttl
end

#ttl_expires_in ⇒ Float

Time left before the message expires, in seconds.

Returns:

  • (Float) —

    the current value of ttl_expires_in



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def ttl_expires_in
  @ttl_expires_in
end

#via_bot_user_id ⇒ Integer

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

Returns:

  • (Integer) —

    the current value of via_bot_user_id



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def via_bot_user_id
  @via_bot_user_id
end

#views ⇒ Integer

Number of times this message was viewed.

Returns:

  • (Integer) —

    the current value of views



40
41
42
# File 'lib/tdlib/types/message.rb', line 40

def views
  @views
end