Skip to main content

Module types

Module types 

Source
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.
CallbackQuery
This object represents an incoming callback query from a callback button in an inline keyboard.
CallbackQueryId
Unique identifier for CallbackQuery.
Channel
This object represents a channel.
ChannelId
Unique channel identifier.
ChannelPost
This object represents a channel message.
ChatId
Unique chat identifier.
ChatMember
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.
ForceReply
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.
InlineKeyboardButton
This object represents one button of an inline keyboard.
InlineKeyboardMarkup
This object represents an inline keyboard that appears right next to the message it belongs to.
InlineQuery
InlineQueryId
InlineQueryResultArticle
InlineQueryResultAudio
InlineQueryResultCachedAudio
InlineQueryResultCachedDocument
InlineQueryResultCachedGif
InlineQueryResultCachedMpeg4Gif
InlineQueryResultCachedPhoto
InlineQueryResultCachedSticker
InlineQueryResultCachedVideo
InlineQueryResultCachedVoice
InlineQueryResultContact
InlineQueryResultDocument
InlineQueryResultGame
InlineQueryResultGif
InlineQueryResultLocation
InlineQueryResultMpeg4Gif
InlineQueryResultPhoto
InlineQueryResultVenue
InlineQueryResultVideo
InlineQueryResultVoice
InputContactMessageContent
InputFile
InputFileRef
InputFileUpload
InputLocationMessageContent
InputTextMessageContent
InputVenueMessageContent
KeyboardButton
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.
MessageEntity
This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
MessageId
Unique message identifier inside a chat.
PhotoSize
This object represents one size of a photo or a file / sticker thumbnail.
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.
RawChat
This object represents a chat, directly mapped.
RawMessage
This object represents a message. Directly mapped.
RawMessageEntity
This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. Directly mapped.
RawResponse
Directly mapped telegram API response.
ReplyKeyboardMarkup
This object represents a custom keyboard with reply options.
ReplyKeyboardRemove
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).
ResponseParameters
Contains information about why a request was unsuccessful.
Sticker
This object represents a sticker.
Supergroup
This object represents a supergroup.
SupergroupId
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.
UserProfilePhotos
This object represent a user’s profile pictures.
Venue
This object represents a venue.
Video
This object represents a video file.
VideoNote
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.
ChatMemberStatus
The member’s status in the chat
ChatRef
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
ForwardFrom
Information about the source of the original message.
InlineKeyboardButtonKind
InlineQueryResult
This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
InputMessageContent
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:
MessageChat
This object represents a private, group or supergroup.
MessageEntityKind
Kind of the entity.
MessageKind
Kind of the message.
MessageOrChannelPost
This object represents a chat message or a channel post.
ParseMode
Strongly typed ParseMode. See documentation for details.
PollType
Type of a poll.
ReplyMarkup
ResponseWrapper
All API responses are from this type. Mostly used internal.
UpdateKind
Kind of the incoming update.

Traits§

ToCallbackQueryId
Get CallbackQueryId from the type reference.
ToChatRef
Get ChatRef from the type reference.
ToFileRef
Get FileRef from the type reference.
ToMessageId
Get MessageId from the type reference.
ToSourceChat
Get source ChatId from the type reference.
ToUserId
Get UserId from the type reference.

Type Aliases§

Float
The Telegram Float, currently f32.
Integer
The Telegram Integer, currently i64.