Class: TD::Types::SponsoredMessage

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

Overview

Describes a sponsored message.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#accent_color_idInteger

Identifier of the accent color for title, button text and message background.

Returns:

  • (Integer)

    the current value of accent_color_id



19
20
21
# File 'lib/tdlib/types/sponsored_message.rb', line 19

def accent_color_id
  @accent_color_id
end

#additional_infoTD::Types::String

If non-empty, additional information about the sponsored message to be shown along with the message.

Returns:

  • (TD::Types::String)

    the current value of additional_info



19
20
21
# File 'lib/tdlib/types/sponsored_message.rb', line 19

def additional_info
  @additional_info
end

#background_custom_emoji_idInteger

Identifier of a custom emoji to be shown on the message background; 0 if none.

Returns:

  • (Integer)

    the current value of background_custom_emoji_id



19
20
21
# File 'lib/tdlib/types/sponsored_message.rb', line 19

def background_custom_emoji_id
  @background_custom_emoji_id
end

#button_textTD::Types::String

Text for the message action button.

Returns:

  • (TD::Types::String)

    the current value of button_text



19
20
21
# File 'lib/tdlib/types/sponsored_message.rb', line 19

def button_text
  @button_text
end

#can_be_reportedBoolean

True, if the message can be reported to Telegram moderators through reportChatSponsoredMessage.

Returns:

  • (Boolean)

    the current value of can_be_reported



19
20
21
# File 'lib/tdlib/types/sponsored_message.rb', line 19

def can_be_reported
  @can_be_reported
end

#contentTD::Types::MessageContent

Content of the message. Currently, can be only of the types messageText, messageAnimation, messagePhoto, or messageVideo.

Returns:



19
20
21
# File 'lib/tdlib/types/sponsored_message.rb', line 19

def content
  @content
end

True, if the message needs to be labeled as “recommended” instead of “sponsored”.

Returns:

  • (Boolean)

    the current value of is_recommended



19
20
21
# File 'lib/tdlib/types/sponsored_message.rb', line 19

def is_recommended
  @is_recommended
end

#message_idInteger

Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages.

Returns:

  • (Integer)

    the current value of message_id



19
20
21
# File 'lib/tdlib/types/sponsored_message.rb', line 19

def message_id
  @message_id
end

Information about the sponsor of the message.

Returns:



19
20
21
# File 'lib/tdlib/types/sponsored_message.rb', line 19

def sponsor
  @sponsor
end

#titleTD::Types::String

Title of the sponsored message.

Returns:

  • (TD::Types::String)

    the current value of title



19
20
21
# File 'lib/tdlib/types/sponsored_message.rb', line 19

def title
  @title
end