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:



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def audio
  @audio
end

#captionString

Optional. Caption for the photo or video

Returns:

  • (String)

    the current value of caption



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def caption
  @caption
end

#chatTelegrammer::DataTypes::Chat

Conversation the message belongs to

Returns:



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def chat
  @chat
end

#contactTelegrammer::DataTypes::Contact

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

Returns:



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def contact
  @contact
end

#dateDateTime

Date the message was sent

Returns:

  • (DateTime)

    the current value of date



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def date
  @date
end

#delete_chat_photoBoolean

Optional. Informs that the group photo was deleted

Returns:

  • (Boolean)

    the current value of delete_chat_photo



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def delete_chat_photo
  @delete_chat_photo
end

#documentTelegrammer::DataTypes::Document

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

Returns:



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def document
  @document
end

#forward_dateDateTime

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

Returns:

  • (DateTime)

    the current value of forward_date



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def forward_date
  @forward_date
end

#forward_fromTelegrammer::DataTypes::User

Optional. For forwarded messages, sender of the original message

Returns:



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def forward_from
  @forward_from
end

#fromTelegrammer::DataTypes::User

Sender

Returns:



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def from
  @from
end

#group_chat_createdBoolean

Optional. Informs that the group has been created

Returns:

  • (Boolean)

    the current value of group_chat_created



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

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:



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def left_chat_participant
  @left_chat_participant
end

#locationTelegrammer::DataTypes::Location

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

Returns:



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def location
  @location
end

#message_idInteger

Unique message identifier

Returns:

  • (Integer)

    the current value of message_id



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def message_id
  @message_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:



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def new_chat_participant
  @new_chat_participant
end

#new_chat_photoTelegrammer::DataTypes::PhotoSize

Optional. A group photo was change to this value

Returns:



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

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



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def new_chat_title
  @new_chat_title
end

#photoTelegrammer::DataTypes::PhotoSize

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

Returns:



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

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:



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def reply_to_message
  @reply_to_message
end

#stickerTelegrammer::DataTypes::Sticker

Optional. Message is a sticker, information about the sticker

Returns:



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def sticker
  @sticker
end

#textString

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

Returns:

  • (String)

    the current value of text



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def text
  @text
end

#videoTelegrammer::DataTypes::Video

Optional. Message is a video, information about the video

Returns:



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def video
  @video
end

#voiceTelegrammer::DataTypes::Voice

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

Returns:



30
31
32
# File 'lib/telegrammer/data_types/message.rb', line 30

def voice
  @voice
end