Class: Telegrammer::DataTypes::Message

Inherits:
Base
  • Object
show all
Defined in:
lib/telegrammer/data_types/message.rb

Overview

Telegram Message data type

See more at core.telegram.org/bots/api#message

Instance Attribute Summary collapse

Instance Attribute Details

#audioTelegrammer::DataTypes::Audio

Optional. Message is an audio file, information about the file

Returns:



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def audio
  @audio
end

#captionString

Optional. Caption for the photo or video

Returns:

  • (String)

    the current value of caption



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def caption
  @caption
end

#channel_chat_createdBoolean

Optional. Service message: the channel has been created

Returns:

  • (Boolean)

    the current value of channel_chat_created



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def channel_chat_created
  @channel_chat_created
end

#chatTelegrammer::DataTypes::Chat

Conversation the message belongs to

Returns:



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def chat
  @chat
end

#contactTelegrammer::DataTypes::Contact

Optional. Message is a shared contact, information about the contact

Returns:



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def contact
  @contact
end

#dateDateTime

Date the message was sent

Returns:

  • (DateTime)

    the current value of date



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def date
  @date
end

#delete_chat_photoBoolean

Optional. Informs that the group photo was deleted

Returns:

  • (Boolean)

    the current value of delete_chat_photo



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def delete_chat_photo
  @delete_chat_photo
end

#documentTelegrammer::DataTypes::Document

Optional. Message is a general file, information about the file

Returns:



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def document
  @document
end

#forward_dateDateTime

Optional. For forwarded messages, date the original message was sent

Returns:

  • (DateTime)

    the current value of forward_date



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def forward_date
  @forward_date
end

#forward_fromTelegrammer::DataTypes::User

Optional. For forwarded messages, sender of the original message

Returns:



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def forward_from
  @forward_from
end

#fromTelegrammer::DataTypes::User

Sender

Returns:



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def from
  @from
end

#group_chat_createdBoolean

Optional. Informs that the group has been created

Returns:

  • (Boolean)

    the current value of group_chat_created



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def group_chat_created
  @group_chat_created
end

#left_chat_participantTelegrammer::DataTypes::User

Optional. A member was removed from the group, information about them (this member may be bot itself)

Returns:



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def left_chat_participant
  @left_chat_participant
end

#locationTelegrammer::DataTypes::Location

Optional. Message is a shared location, information about the location

Returns:



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def location
  @location
end

#message_idInteger

Unique message identifier

Returns:

  • (Integer)

    the current value of message_id



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def message_id
  @message_id
end

#migrate_from_chat_idInteger

Optional. The supergroup has been migrated from a group with the specified identifier, not exceeding 1e13 by absolute value

Returns:

  • (Integer)

    the current value of migrate_from_chat_id



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def migrate_from_chat_id
  @migrate_from_chat_id
end

#migrate_to_chat_idInteger

Optional. The group has been migrated to a supergroup with the specified identifier, not exceeding 1e13 by absolute value

Returns:

  • (Integer)

    the current value of migrate_to_chat_id



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def migrate_to_chat_id
  @migrate_to_chat_id
end

#new_chat_participantTelegrammer::DataTypes::User

Optional. A new member was added to the group, information about them (this member may be bot itself)

Returns:



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def new_chat_participant
  @new_chat_participant
end

#new_chat_photoTelegrammer::DataTypes::PhotoSize

Optional. A group photo was change to this value

Returns:



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def new_chat_photo
  @new_chat_photo
end

#new_chat_titleString

Optional. A group title was changed to this value

Returns:

  • (String)

    the current value of new_chat_title



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def new_chat_title
  @new_chat_title
end

#photoTelegrammer::DataTypes::PhotoSize

Optional. Message is a photo, available sizes of the photo

Returns:



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def photo
  @photo
end

#reply_to_messageTelegrammer::DataTypes::Message

Optional. For replies, 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.

Returns:



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def reply_to_message
  @reply_to_message
end

#stickerTelegrammer::DataTypes::Sticker

Optional. Message is a sticker, information about the sticker

Returns:



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def sticker
  @sticker
end

#supergroup_chat_createdBoolean

Optional. Service message: the supergroup has been created

Returns:

  • (Boolean)

    the current value of supergroup_chat_created



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def supergroup_chat_created
  @supergroup_chat_created
end

#textString

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

Returns:

  • (String)

    the current value of text



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def text
  @text
end

#videoTelegrammer::DataTypes::Video

Optional. Message is a video, information about the video

Returns:



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def video
  @video
end

#voiceTelegrammer::DataTypes::Voice

Optional. Message is a voice message, information about the file

Returns:



34
35
36
# File 'lib/telegrammer/data_types/message.rb', line 34

def voice
  @voice
end