Module tgbot::types[][src]

Types available in the Bot API

Structs

Animation

An animation file (GIF or H.264/MPEG-4 AVC video without sound)

Audio

Audio file to be treated as music by the Telegram clients

BotCommand

This object represents a bot command

CallbackQuery

Incoming callback query from a callback button in an inline keyboard

ChannelChat

Channel chat

ChatInviteLink

Represents an invite link for a chat.

ChatLocation

Represents a location to which a chat is connected

ChatMemberAdministrator

Chat admin

ChatMemberKicked

Kicked user

ChatMemberRestricted

Restricted user

ChatMemberUpdated

Represents changes in the status of a chat member

ChatPermissions

Describes actions that a non-administrator user is allowed to take in a chat

ChatPhoto

Chat photo

ChosenInlineResult

Result of an inline query that was chosen by the user and sent to their chat partner

Command

A simple command implementation

Contact

Phone contact

Dice

Represents a dice with random value

Document

General file (as opposed to photos, voice messages and audio files)

EncryptedCredentials

Data required for decrypting and authenticating EncryptedPassportElement

EncryptedPassportElementAddress

Address

EncryptedPassportElementBankStatement

Bank statement

EncryptedPassportElementDriverLicense

Driver license

EncryptedPassportElementEmail

E-Mail

EncryptedPassportElementIdentityCard

Identity card

EncryptedPassportElementInternalPassport

Internal passport

EncryptedPassportElementPassport

Passport

EncryptedPassportElementPassportRegistration

Passport registration

EncryptedPassportElementPersonalDetails

Personal details

EncryptedPassportElementPhoneNumber

Phone number

EncryptedPassportElementRentalAgreement

Rental agreement

EncryptedPassportElementTemporaryRegistration

Temporary registration

EncryptedPassportElementUtilityBill

Utility bill

File

File ready to be downloaded

ForceReply

Display a reply interface to the user

Forward

Contains information about original message

Game

Game

GameHighScore

One row of the high scores table for a game

GroupChat

Group chat

InlineKeyboardButton

Button of an inline keyboard

InlineKeyboardMarkup

Inline keyboard that appears right next to the message it belongs to

InlineQuery

Incoming inline query

InlineQueryResultArticle

Link to an article or web page

InlineQueryResultAudio

Link to an mp3 audio file

InlineQueryResultCachedAudio

Link to an mp3 audio file stored on the Telegram servers

InlineQueryResultCachedDocument

Link to a file stored on the Telegram servers

InlineQueryResultCachedGif

Link to an animated GIF file stored on the Telegram servers

InlineQueryResultCachedMpeg4Gif

Link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers

InlineQueryResultCachedPhoto

Link to a photo stored on the Telegram servers

InlineQueryResultCachedSticker

Link to a sticker stored on the Telegram servers

InlineQueryResultCachedVideo

Link to a video file stored on the Telegram servers

InlineQueryResultCachedVoice

Link to a voice message stored on the Telegram servers

InlineQueryResultContact

Contact with a phone number

InlineQueryResultDocument

Link to a file

InlineQueryResultGame

Game

InlineQueryResultGif

Link to an animated GIF file

InlineQueryResultLocation

Location on a map

InlineQueryResultMpeg4Gif

Link to a video animation (H.264/MPEG-4 AVC video without sound)

InlineQueryResultPhoto

Link to a photo

InlineQueryResultVenue

Venue

InlineQueryResultVideo

Link to a page containing an embedded video player or a video file

InlineQueryResultVoice

Link to a voice recording in an .ogg container encoded with OPUS

InputFile

File to upload

InputFileInfo

Information about a file for reader

InputFileReader

File reader to upload

InputMedia

Content of a media message to be sent

InputMediaAnimation

Animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent

InputMediaAudio

Audio file to be treated as music to be sent

InputMediaDocument

General file to be sent

InputMediaPhoto

Photo to be sent

InputMediaVideo

Video to be sent

InputMessageContentContact

Contact message to be sent as the result of an inline query

InputMessageContentLocation

Location message to be sent as the result of an inline query

InputMessageContentText

Text message to be sent as the result of an inline query

InputMessageContentVenue

Venue message to be sent as the result of an inline query

Invoice

Basic information about an invoice

KeyboardButton

Button of the reply keyboard

KeyboardButtonPollType

This object represents type of a poll which is allowed to be created and sent when the corresponding button is pressed

LabeledPrice

Portion of the price for goods or services

Location

Point on the map

LoginUrl

Represents a parameter of the inline keyboard button used to automatically authorize a user

MaskPosition

Position on faces where a mask should be placed by default

Me

A Bot info returned in getMe

MediaGroup

Group of photos and/or videos to be sent

Message

This object represents a message

MessageId

Represents a unique message identifier

NewSticker

A new sticker to upload

OrderInfo

Information about an order

PassportData

Telegram Passport data shared with the bot by the user

PassportElementError

Error in the Telegram Passport element which was submitted that should be resolved by the user

PassportFile

File uploaded to Telegram Passport

PhotoSize

Size of a photo or a file / sticker thumbnail

PollAnswer

An answer of a user in a non-anonymous poll

PollOption

Contains information about one answer option in a poll

PreCheckoutQuery

Information about an incoming pre-checkout query

PrivateChat

Private chat

ProximityAlertTriggered

Represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user

Quiz

A quiz

RegularPoll

A regular poll

ReplyKeyboardMarkup

Custom keyboard with reply options

ReplyKeyboardRemove

Requests clients to remove the custom keyboard

ResponseError

Response error

ShippingAddress

Shipping address

ShippingOption

Shipping option

ShippingQuery

Information about an incoming shipping query

Sticker

Sticker

StickerSet

Sticker set

SuccessfulPayment

Basic information about a successful payment

SupergroupChat

Supergroup chat

Text

Text with entities

TextEntityBotCommand

Describes a bot command found in text

TextEntityPosition

Describes position of entity in text

UnexpectedEncryptedPassportElementKind

Unexpected encrypted passport element kind

Update

Incoming update

User

Telegram user or bot

UserProfilePhotos

User’s profile pictures

Venue

Venue

Video

Video file

VideoNote

Video message

Voice

Voice note

WebhookInfo

Information about the current status of a webhook

Enums

AllowedUpdate

Type of update to receive

BotCommandError

An error when creating a new BotCommand

CallbackQueryError

An error occurred in callback query

Chat

Chat

ChatAction

Type of action to tell the user that some is happening on the bot’s side

ChatId

Chat ID or username

ChatMember

Information about one member of a chat

CommandError

An error when parsing command

DiceKind

Kind of the dice

EditMessageResult

Result of editMessage* requests

EncryptedPassportElement

Information about documents or other Telegram Passport elements shared with the bot by the user

EncryptedPassportElementKind

Type of encrypted passport element

ForwardFrom

Sender of the original message

InlineKeyboardButtonKind

Variant of inline keyboard button

InlineKeyboardError

An error occurred with inline keyboard

InlineQueryResult

Result of an inline query

InputMediaError

An error occurred with InputMedia

InputMessageContent

Content of a message to be sent as a result of an inline query

MaskPositionError

An error occurred with mask position

MaskPositionPoint

The part of the face relative to which the mask should be placed

MediaGroupError

A media group error

MentionError

An error occurred when getting user mention

MessageData

Contains message data

MessageDataError

A message data error when parsing message data

MessageKind

Contains chat-specific data

ParseMode

Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.

Poll

Contains information about a poll

PollKind

Kind of a poll

ReplyMarkup

Reply markup

ReplyMarkupError

An error occurred with reply markup

Response

API Response

TextEntity

Respresents an entity in a text

TextEntityError

An error when parsing/serializing entities

UpdateKind

Kind of update

UserId

User ID

Type Definitions

Float

Telegram Float type

Integer

Telegram Integer type