Module telegram_bot::types [] [src]

Telegram bot types.

Reexports

pub use requests::*;

Modules

requests

Telegram Bot API methods.

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.

Contact

This object represents a phone contact.

DetachedRequest
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.

JsonIdResponse
JsonTrueToUnitResponse
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.

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).

Sticker

This object represents a sticker.

Supergroup

This object represents a supergroup.

SupergroupId

Unique supergroup identifier.

Update

This object represents an incoming update.

User

This object represents a Telegram user or bot.

UserId

Unique user identifier.

Venue

This object represents a venue.

Video

This object represents a video file.

Voice

This object represents a voice note.

Enums

Chat

This object represents a chat.

ChatAction

Strongly typed ChatAction. Instead of passing a String to the chat_action method, this is used.

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.

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.

ReplyMarkup
UpdateKind

Kind of the incoming update.

Traits

JsonResponse
Request
ResponseType
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 Definitions

Float

The Telegram Float, currently f32.

Integer

The Telegram Integer, currently i64.