Module message

Module message 

Source

Structs§

Contact
This object represents a phone contact.
CopyMessage
Use this method to copy messages of any kind. Service messages and invoice messages can’t be copied. The method is analogous to the method forwardMessage, but the copied message doesn’t have a link to the original message. Returns the MessageId of the sent message on success.
DeleteMessage
Use this method to delete a message, including service messages, with the following limitations:
Dice
This object represents an animated emoji that displays a random value.
EditInlineMessageCaption
Use this method to edit captions of messages. On success, the edited Message is returned.
EditInlineMessageLiveLocation
Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, True is returned.
EditInlineMessageMedia
Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can’t be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, True is returned.
EditInlineMessageReplyMarkup
Use this method to edit only the reply markup of messages. On success, True is returned.
EditInlineMessageText
Use this method to edit text and game messages. On success, True is returned.
EditMessageCaption
Use this method to edit captions of messages. On success, the edited Message is returned.
EditMessageLiveLocation
Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, the edited Message is returned.
EditMessageMedia
Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can’t be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, the edited Message is returned.
EditMessageReplyMarkup
Use this method to edit only the reply markup of messages. On success, the edited Message is returned.
EditMessageText
Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
ForwardMessage
Use this method to forward messages of any kind. Service messages can’t be forwarded. On success, the sent Message is returned.
Game
Location
This object represents a point on the map.
Message
This object represents a message.
MessageAutoDeleteTimerChanged
This object represents a service message about a change in auto-delete timer settings.
MessageId
This object represents a unique message identifier.
PassportData
Poll
This object contains information about a poll.
PollAnswer
This object represents an answer of a user in a non-anonymous poll.
PollOption
This object contains information about one answer option in a poll.
ProximityAlertTriggered
This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.
SendAnimation
Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
SendAudio
Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned.
SendChatAction
Use this method when you need to tell the user that something is happening on the bot’s side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.
SendContact
Use this method to send text messages. On success, the sent Message is returned.
SendDice
Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.
SendDocument
Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
SendLocation
Use this method to send point on the map. On success, the sent Message is returned.
SendMediaGroup
Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.
SendMessage
Use this method to send text messages. On success, the sent Message is returned.
SendPhoto
Use this method to send photos. On success, the sent Message is returned.
SendPoll
Use this method to send a native poll. On success, the sent Message is returned.
SendVenue
Use this method to send information about a venue. On success, the sent Message is returned.
SendVideo
Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
SendVideoNote
As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent Message is returned.
SendVoice
Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
StopInlineMessageLiveLocation
Use this method to stop updating a live location message before live_period expires. On success, True is returned.
StopMessageLiveLocation
Use this method to stop updating a live location message before live_period expires. On success, the edited Message is returned.
StopPoll
Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.
Venue
This object represents a venue.
VoiceChatEnded
This object represents a service message about a voice chat ended in the chat.
VoiceChatParticipantsInvited
This object represents a service message about new members invited to a voice chat.
VoiceChatScheduled
This object represents a service message about a voice chat scheduled in the chat.
VoiceChatStarted
This object represents a service message about a voice chat started in the chat. Currently holds no information.

Enums§

ChatActionKind
Chat action type
MessageKind
Variants of a message.
PollKind
Poll type