Expand description
Telegram bot types.
Re-exports§
pub use requests::*;
Modules§
- callback_
query - chat
- chat_
member - inline_
query - inline_
query_ result - input_
file - message
- primitive
- refs
- reply_
markup - requests
- Telegram Bot API methods.
- response_
parameters - text
- update
Structs§
- Audio
- This object represents an audio file to be treated as music by the Telegram clients.
- Callback
Query - This object represents an incoming callback query from a callback button in an inline keyboard.
- Callback
Query Id - Unique identifier for CallbackQuery.
- Channel
- This object represents a channel.
- Channel
Id - Unique channel identifier.
- Channel
Post - This object represents a channel message.
- ChatId
- Unique chat identifier.
- Chat
Member - This object contains information about one member of the chat.
- Contact
- This object represents a phone contact.
- Document
- This object represents a general file (as opposed to photos, voice messages and audio files).
- File
- This object represents a file ready to be downloaded.
The file can be downloaded via the link
https://api.telegram.org/file/bot<token>/<file_path>. It is guaranteed that the link will be valid for at least 1 hour. - FileRef
- Unique file identifier reference.
- Force
Reply - Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot‘s message and tapped ’Reply’). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mod
- Forward
- Information about the original message.
- Group
- This object represents a group.
- GroupId
- Unique group identifier.
- Inline
Keyboard Button - This object represents one button of an inline keyboard.
- Inline
Keyboard Markup - This object represents an inline keyboard that appears right next to the message it belongs to.
- Inline
Query - Inline
Query Id - Inline
Query Result Article - Inline
Query Result Audio - Inline
Query Result Cached Audio - Inline
Query Result Cached Document - Inline
Query Result Cached Gif - Inline
Query Result Cached Mpeg4 Gif - Inline
Query Result Cached Photo - Inline
Query Result Cached Sticker - Inline
Query Result Cached Video - Inline
Query Result Cached Voice - Inline
Query Result Contact - Inline
Query Result Document - Inline
Query Result Game - Inline
Query Result Gif - Inline
Query Result Location - Inline
Query Result Mpeg4 Gif - Inline
Query Result Photo - Inline
Query Result Venue - Inline
Query Result Video - Inline
Query Result Voice - Input
Contact Message Content - Input
File - Input
File Ref - Input
File Upload - Input
Location Message Content - Input
Text Message Content - Input
Venue Message Content - Keyboard
Button - This object represents one button of the reply keyboard.
- Location
- This object represents a point on the map.
- Message
- This object represents a chat message.
- Message
Entity - This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
- Message
Id - Unique message identifier inside a chat.
- Photo
Size - This object represents one size of a photo or a file / sticker thumbnail.
- Poll
- This object contains information about a poll.
- Poll
Answer - This object represents an answer of a user in a non-anonymous poll.
- Poll
Option - This object contains information about one answer option in a poll.
- RawChat
- This object represents a chat, directly mapped.
- RawMessage
- This object represents a message. Directly mapped.
- RawMessage
Entity - This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. Directly mapped.
- RawResponse
- Directly mapped telegram API response.
- Reply
Keyboard Markup - This object represents a custom keyboard with reply options.
- Reply
Keyboard Remove - Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup).
- Response
Parameters - Contains information about why a request was unsuccessful.
- Sticker
- This object represents a sticker.
- Supergroup
- This object represents a supergroup.
- Supergroup
Id - Unique supergroup identifier.
- Text
- True
- Update
- This object represents an incoming update.
- User
- This object represents a Telegram user or bot.
- UserId
- Unique user identifier.
- User
Profile Photos - This object represent a user’s profile pictures.
- Venue
- This object represents a venue.
- Video
- This object represents a video file.
- Video
Note - This object represents a video message (available in Telegram apps as of v.4.0).
- Voice
- This object represents a voice note.
Enums§
- Chat
- This object represents a chat.
- Chat
Member Status - The member’s status in the chat
- ChatRef
- Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- Forward
From - Information about the source of the original message.
- Inline
Keyboard Button Kind - Inline
Query Result - This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
- Input
Message Content - This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 4 types:
- Message
Chat - This object represents a private, group or supergroup.
- Message
Entity Kind - Kind of the entity.
- Message
Kind - Kind of the message.
- Message
OrChannel Post - This object represents a chat message or a channel post.
- Parse
Mode - Strongly typed ParseMode. See documentation for details.
- Poll
Type - Type of a poll.
- Reply
Markup - Response
Wrapper - All API responses are from this type. Mostly used internal.
- Update
Kind - Kind of the incoming update.
Traits§
- ToCallback
Query Id - Get
CallbackQueryIdfrom the type reference. - ToChat
Ref - Get
ChatReffrom the type reference. - ToFile
Ref - Get
FileReffrom the type reference. - ToMessage
Id - Get
MessageIdfrom the type reference. - ToSource
Chat - Get source
ChatIdfrom the type reference. - ToUser
Id - Get
UserIdfrom the type reference.