Class: Telegrammer::DataTypes::Message
- 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
-
#audio ⇒ Telegrammer::DataTypes::Audio
Optional.
-
#caption ⇒ String
Optional.
-
#channel_chat_created ⇒ Boolean
Optional.
-
#chat ⇒ Telegrammer::DataTypes::Chat
Conversation the message belongs to.
-
#contact ⇒ Telegrammer::DataTypes::Contact
Optional.
-
#date ⇒ DateTime
Date the message was sent.
-
#delete_chat_photo ⇒ Boolean
Optional.
-
#document ⇒ Telegrammer::DataTypes::Document
Optional.
-
#forward_date ⇒ DateTime
Optional.
-
#forward_from ⇒ Telegrammer::DataTypes::User
Optional.
-
#from ⇒ Telegrammer::DataTypes::User
Sender.
-
#group_chat_created ⇒ Boolean
Optional.
-
#left_chat_participant ⇒ Telegrammer::DataTypes::User
Optional.
-
#location ⇒ Telegrammer::DataTypes::Location
Optional.
-
#message_id ⇒ Integer
Unique message identifier.
-
#migrate_from_chat_id ⇒ Integer
Optional.
-
#migrate_to_chat_id ⇒ Integer
Optional.
-
#new_chat_participant ⇒ Telegrammer::DataTypes::User
Optional.
-
#new_chat_photo ⇒ Telegrammer::DataTypes::PhotoSize
Optional.
-
#new_chat_title ⇒ String
Optional.
-
#photo ⇒ Telegrammer::DataTypes::PhotoSize
Optional.
-
#reply_to_message ⇒ Telegrammer::DataTypes::Message
Optional.
-
#sticker ⇒ Telegrammer::DataTypes::Sticker
Optional.
-
#supergroup_chat_created ⇒ Boolean
Optional.
-
#text ⇒ String
Optional.
-
#video ⇒ Telegrammer::DataTypes::Video
Optional.
-
#voice ⇒ Telegrammer::DataTypes::Voice
Optional.
Instance Attribute Details
#audio ⇒ Telegrammer::DataTypes::Audio
Optional. Message is an audio file, information about the file
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def audio @audio end |
#caption ⇒ String
Optional. Caption for the photo or video
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def @caption end |
#channel_chat_created ⇒ Boolean
Optional. Service message: the channel has been created
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def channel_chat_created @channel_chat_created end |
#chat ⇒ Telegrammer::DataTypes::Chat
Conversation the message belongs to
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def chat @chat end |
#contact ⇒ Telegrammer::DataTypes::Contact
Optional. Message is a shared contact, information about the contact
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def contact @contact end |
#date ⇒ DateTime
Date the message was sent
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def date @date end |
#delete_chat_photo ⇒ Boolean
Optional. Informs that the group photo was deleted
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def delete_chat_photo @delete_chat_photo end |
#document ⇒ Telegrammer::DataTypes::Document
Optional. Message is a general file, information about the file
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def document @document end |
#forward_date ⇒ DateTime
Optional. For forwarded messages, date the original message was sent
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def forward_date @forward_date end |
#forward_from ⇒ Telegrammer::DataTypes::User
Optional. For forwarded messages, sender of the original message
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def forward_from @forward_from end |
#from ⇒ Telegrammer::DataTypes::User
Sender
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def from @from end |
#group_chat_created ⇒ Boolean
Optional. Informs that the group has been created
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def group_chat_created @group_chat_created end |
#left_chat_participant ⇒ Telegrammer::DataTypes::User
Optional. A member was removed from the group, information about them (this member may be bot itself)
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def left_chat_participant @left_chat_participant end |
#location ⇒ Telegrammer::DataTypes::Location
Optional. Message is a shared location, information about the location
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def location @location end |
#message_id ⇒ Integer
Unique message identifier
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def @message_id end |
#migrate_from_chat_id ⇒ Integer
Optional. The supergroup has been migrated from a group with the specified identifier, not exceeding 1e13 by absolute value
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_id ⇒ Integer
Optional. The group has been migrated to a supergroup with the specified identifier, not exceeding 1e13 by absolute value
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def migrate_to_chat_id @migrate_to_chat_id end |
#new_chat_participant ⇒ Telegrammer::DataTypes::User
Optional. A new member was added to the group, information about them (this member may be bot itself)
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def new_chat_participant @new_chat_participant end |
#new_chat_photo ⇒ Telegrammer::DataTypes::PhotoSize
Optional. A group photo was change to this value
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def new_chat_photo @new_chat_photo end |
#new_chat_title ⇒ String
Optional. A group title was changed to this value
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def new_chat_title @new_chat_title end |
#photo ⇒ Telegrammer::DataTypes::PhotoSize
Optional. Message is a photo, available sizes of the photo
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def photo @photo end |
#reply_to_message ⇒ Telegrammer::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.
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def @reply_to_message end |
#sticker ⇒ Telegrammer::DataTypes::Sticker
Optional. Message is a sticker, information about the sticker
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def sticker @sticker end |
#supergroup_chat_created ⇒ Boolean
Optional. Service message: the supergroup has been created
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def supergroup_chat_created @supergroup_chat_created end |
#text ⇒ String
Optional. For text messages, the actual UTF-8 text of the message
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def text @text end |
#video ⇒ Telegrammer::DataTypes::Video
Optional. Message is a video, information about the video
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def video @video end |
#voice ⇒ Telegrammer::DataTypes::Voice
Optional. Message is a voice message, information about the file
34 35 36 |
# File 'lib/telegrammer/data_types/message.rb', line 34 def voice @voice end |