Skip to content
Abdi Urgessa edited this page Feb 19, 2024 · 5 revisions

Typedefs

telesun : Object

main telesun class

LongPollingOptions : Object

Options for initiating long polling.

PollingOptions : Object

Options for initiating simple polling.

DevHookOptions : Object

Options for setting up a development webhook.

SetWebhookOptions : Object

Options for configuring the webhook.

DeleteWebhookOptions : Object

Options for deleting the configured webhook.

UpdateType : "message" | "edited_message" | "channel_post" | "edited_channel_post" | "inline_query" | "chosen_inline_result" | "callback_query" | "shipping_query" | "pre_checkout_query" | "poll" | "poll_answer" | "my_chat_member" | "chat_member" | "chat_join_request" | "message_reaction" | "message_reaction_count" | "chat_boost" | "removed_chat_boost"

Update types for the 'on' method.

Format : "HTML" | "MarkdownV2"

Formatting options.

UpdateConfig : "webhook" | "polling"

config options for devHook.

Server : "GAS" | "VERCEL" | "RENDER"

server config options for devHook.

Update : Object
ForwardMessageOptions : Object

Options for forwarding a single message from one chat to another.

ForwardMessagesOptions : Object

Options for forwarding multiple messages from one chat to another.

CopyMessageOptions : Object

Options for copying a single message from one chat to another, potentially with a new caption.

CopyMessagesOptions : Object

Options for copying multiple messages from one chat to another without changing the caption.

SendPhotoOptions : Object

Options for sending a photo.

SendAudioOptions : Object

Options for sending an audio file.

SendDocumentOptions : Object

Options for sending a document.

SendVideoOptions : Object

Options for sending a video.

SendAnimationOptions : Object

Options for sending an animation.

SendVoiceOptions : Object

Options for sending a voice message.

SendVideoNoteOptions : Object

Options for sending a video note.

SendMediaGroupOptions : Object

Options for sending a media group.

SendLocationOptions : Object

Options for sending a location message.

SendVenueOptions : Object

Options for sending a venue message.

SendContactOptions : Object

Options for sending a contact message.

SendPollOptions : Object

Options for sending a poll.

SendDiceOptions : Object

Options for sending a dice message.

SendChatActionOptions : Object

Options for sending chat action.

SetMessageReactionOptions : Object

Options for setting message reaction.

GetUserProfilePhotosOptions : Object

Options for getting a user's profile photos.

GetFileOptions : Object

Options for getting file information.

BanChatMemberOptions : Object

Options for banning a chat member.

UnbanChatMemberOptions : Object

Options for unbanning a previously banned user in a supergroup or channel.

RestrictChatMemberOptions : Object

Options for restricting a user in a supergroup.

SetChatAdministratorCustomTitleOptions : Object

Options for promoting or demoting a user in a supergroup or channel.

BanChatSenderChatOptions : Object

Options for banning a channel chat in a supergroup or channel.

UnbanChatSenderChatOptions : Object

Options for unbanning a previously banned channel chat.

SetChatPermissionsOptions : Object

Options for setting default chat permissions for all members.

ExportChatInviteLinkOptions : Object

Options for generating a new primary invite link for a chat.

CreateChatInviteLinkOptions : Object

Options for creating an additional invite link for a chat.

EditChatInviteLinkOptions : Object

Options for editing a non-primary invite link created by the bot.

RevokeChatInviteLinkOptions : Object

Options for revoking an invite link created by the bot.

ChatJoinRequestOptions : Object

Options for managing a chat join request.

SetChatPhotoOptions : Object

Options for setting a new chat photo.

deleteChatPhotoOptions : Object

Basic options for operations on a chat.

SetChatTitleOptions : Object

Options for changing the title of a chat.

SetChatDescriptionOptions : Object

Options for changing the description of a chat.

PinChatMessageOptions : Object

Options for pinning a message in a chat.

UnpinChatMessageOptions : Object

Options for unpinning a chat message.

ChatIdOptions : Object

Options requiring only a chat ID.

GetChatMemberOptions : Object

Options for getting information about a chat member.

GetChatMemberOptions : Object

Options for getting information about a member of a chat.

SetChatStickerSetOptions : Object

Options for setting a new group sticker set for a supergroup.

CreateForumTopicOptions : Object

Options for creating a topic in a forum supergroup chat.

EditForumTopicOptions : Object

Options for editing the name and icon of a forum topic.

ForumTopicManagementOptions : Object

Options for closing or reopening a topic in a forum supergroup chat.

EditGeneralForumTopicOptions : Object

Options for editing the name of the 'General' topic in a forum supergroup chat.

AnswerCallbackQueryOptions : Object

Options for sending answers to callback queries sent from inline keyboards.

GetUserChatBoostsOptions : Object

Options for getting the list of boosts added to a chat by a user.

SetMyCommandsOptions : Object

Options for changing the list of the bot's commands.

DeleteMyCommandsOptions : Object

Options for deleting the bot's commands for a given scope and language.

GetMyCommandsOptions : Object

Options for getting the list of the bot's commands.

SetMyNameOptions : Object

Options for setting the bot's name.

GetMyNameOptions : Object

Options for getting the bot's name.

GetMyDescriptionOptions : Object

Options for getting the bot's description.

SetMyDescriptionOptions : Object

Options for setting the bot's description.

GetMyShortDescriptionOptions : Object

Options for getting the bot's short description.

SetChatMenuButtonOptions : Object

Options for setting the chat menu button.

GetChatMenuButtonOptions : Object

Options for getting the chat menu button.

SetMyDefaultAdministratorRightsOptions : Object

Options for setting the bot's default administrator rights.

GetMyDefaultAdministratorRightsOptions : Object

Options for getting the bot's default administrator rights.

EditMessageTextOptions : Object

Options for editing the text of messages.

EditMessageCaptionOptions : Object

Options for editing the caption of a message.

EditMessageMediaOptions : Object

Options for editing the media content of messages.

EditMessageLiveLocationOptions : Object

Options for editing the live location of a message.

StopMessageLiveLocationOptions : Object

Options for stopping a live location message.

StopMessageLiveLocationOptions : Object

Options for stopping a live location message.

EditMessageReplyMarkupOptions : Object

Options for editing the reply markup of messages.

StopPollOptions : Object

Options for stopping a poll.

DeleteMessageOptions : Object

Options for deleting a message.

DeleteMessagesOptions : Object

Options for deleting multiple messages.

SendStickerOptions : Object

Options for sending a sticker.

GetStickerSetOptions : Object

Options for getting a sticker set.

GetCustomEmojiStickersOptions : Object

Options for getting custom emoji stickers.

UploadStickerFileOptions : Object

Options for uploading a sticker file.

CreateNewStickerSetOptions : Object

Options for creating a new sticker set.

AddStickerToSetOptions : Object

Options for adding a new sticker to a set.

SetStickerPositionInSetOptions : Object

Options for setting the position of a sticker in the set.

DeleteStickerFromSetOptions : Object

Options for deleting a sticker from a set.

SetStickerEmojiListOptions : Object

Options for setting the emoji list for a sticker.

SetStickerKeywordsOptions : Object

Options for setting keywords for a sticker.

SetStickerMaskPositionOptions : Object

Options for setting the mask position of a sticker.

SetStickerSetTitleOptions : Object

Options for setting the title of a sticker set.

SetStickerSetThumbnailOptions : Object

Options for setting the thumbnail of a sticker set.

SetCustomEmojiStickerSetThumbnailOptions : Object

Options for setting the thumbnail of a custom emoji sticker set.

DeleteStickerSetOptions : Object

Options for deleting a sticker set.

AnswerInlineQueryOptions : Object

Options for answering an inline query.

AnswerWebAppQueryOptions : Object

Options for answering a Web App query.

SendInvoiceOptions : Object

Options for sending an invoice.

CreateInvoiceLinkOptions : Object

Options for creating an invoice link.

SendGameOptions : Object

Options for sending a game.

SetGameScoreOptions : Object

Options for setting a user's score in a game.

GetGameHighScoresOptions : Object

Options for retrieving high scores for a game.

SetPassportDataErrorsOptions : Object

Options for informing a user of errors with their Telegram Passport data.

ctx : Object
ReplyOptions : Object

Options for replying with a message.

SendMessageOptions : Object

Options for sending a message to a chat.

ReplyWithFormattedTextOptions : Object

Options for replying with a message formatted in HTML or Markdown.

ReplyWithChatActionOptions : Object

Options for replying with chat action.

ReplyWithEditedMessageOptions : Object

Options for editing and replying with a message.

ReplyWithPhotoOptions : Object

Options for replying with a photo.

WebhookInfo : Object

the current status of a webhook.

MessageId : Object

represents a unique message identifier.

InaccessibleMessage : Object

message that was deleted or is otherwise inaccessible to the bot.

MaybeInaccessibleMessage : Message | InaccessibleMessage

message that can be inaccessible to the bot.

ReplyParameters : Object
MessageOrigin : MessageOriginUser | MessageOriginHiddenUser | MessageOriginChat | MessageOriginChannel

the origin of a message.

MessageOriginUser : Object

originally sent by a known user.

MessageOriginHiddenUser : Object

originally sent by an unknown user.

MessageOriginChat : Object

originally sent on behalf of a chat to a group chat.

MessageOriginChannel : Object

originally sent to a channel chat.

ChatBoostUpdated : Object

a boost added to a chat or changed.

ChatBoostRemoved : Object

a boost removed from a chat.

PollAnswer : Object

answer of a user in a non-anonymous poll.

ChatMemberUpdated : Object

changes in the status of a chat member.

ChatJoinRequest : Object

join request sent to a chat.

CallbackQuery : Object

an incoming callback query from a callback button in an inline keyboard.

ShippingQuery : Object

contains information about an incoming shipping query.

PreCheckoutQuery : Object

contains information about an incoming pre-checkout query.

MessageReactionUpdated : Object

a change of a reaction on a message performed by a user.

MessageReactionCountUpdated : Object

reaction changes on a message with anonymous reactions.

InlineQuery : Object

an incoming inline query.

ChosenInlineResult : Object

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

Message : Object

a message

User : Object

Telegram user or bot.

Chat : Object

a chat.

MessageOrigin : Object

the origin of a message. It can be one of.

ExternalReplyInfo : Object

contains information about a message that is being replied to, which may come from another chat or forum topic.

TextQuote : Object

contains information about the quoted part of a message that is replied to by the given message.

MessageEntity : Object

one special entity in a text message.

LinkPreviewOptions : Object

the options used for link preview generation.

Animation : Object

an animation file, GIF or H.264/MPEG-4 AVC video without sound.

Audio : Object

an audio file to be treated as music by the Telegram clients.

Document : Object

a general file, as opposed to photos, voice messages and audio files.

PhotoSize : Object

one size of a photo or a file / sticker thumbnail.

Sticker : Object

a sticker.

Video : Object

a video file.

VideoNote : Object

a video message, available in Telegram apps as of v.4.0.

Voice : Object

a voice note.

Contact : Object

a phone contact.

Dice : Object

an animated emoji that displays a random value.

Game : Object

a game.

Poll : Object

contains information about a poll.

Venue : Object

a venue.

Location : Object

a point on the map.

MessageAutoDeleteTimerChanged : Object

a service message about a change in auto-delete timer settings.

Invoice : Object

contains basic information about an invoice.

SuccessfulPayment : Object

contains basic information about a successful payment.

UsersShared : Object

contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button.

ChatShared : Object

contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button.

WriteAccessAllowed : Object

This object represents a service message about a user allowing a bot to write messages

PassportData : Object

Describes Telegram Passport data shared with the bot by the user.

ProximityAlertTriggered : Object

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

ForumTopicCreated : Object

a service message about a new forum topic created in the chat.

ForumTopicEdited : Object

a service message about an edited forum topic.

Giveaway : Object

a message about a scheduled giveaway.

GiveawayWinners : Object

a message about the completion of a giveaway with public winners.

GiveawayCompleted : Object

a service message about the completion of a giveaway without public winners.

VideoChatScheduled : Object

a service message about a video chat scheduled in the chat.

VideoChatEnded : Object

a service message about a video chat ended in the chat.

VideoChatParticipantsInvited : Object

a service message about new members invited to a video chat.

WebAppData : Object

data sent from a Web App to the bot.

InlineKeyboardMarkup : Object

an inline keyboard that appears right next to the message it belongs to.

InlineKeyboardButton : Object

one button of an inline keyboard. You must use exactly one of the optional fields.

ReplyKeyboardRemove : Object

Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard.

KeyboardButton : Object

one button of the reply keyboard.

ReplyKeyboardMarkup : Object

a custom keyboard with reply options.

PollOption : Object

information about one answer option in a poll.

UserProfilePhotos : Object

a user's profile pictures.

File : Object

a file ready to be downloaded.

WebAppInfo : Object

a Web App.

KeyboardButtonRequestUsers : Object

the criteria used to request suitable users.

KeyboardButtonRequestChat : Object

the criteria used to request a suitable chat.

KeyboardButtonPollType : Object

type of a poll, which is allowed to be created and sent when the corresponding button is pressed.

LoginUrl : Object

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

SwitchInlineQueryChosenChat : Object

an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query.

ForceReply : Object

a message with this object, Telegram clients will display a reply interface to the user.

ChatPhoto : Object

a chat photo.

ChatInviteLink : Object

an invite link for a chat.

ChatAdministratorRights : Object

the rights of an administrator in a chat.

ChatMember : ChatMemberOwner | ChatMemberAdministrator | ChatMemberMember | ChatMemberRestricted | ChatMemberLeft | ChatMemberBanned

information about one member of a chat.

ChatMemberOwner : Object

a chat member that owns the chat and has all administrator privileges.

ChatMemberAdministrator : Object

a chat member that has some additional privileges.

ChatMemberMember : Object

a chat member that has no additional privileges or restrictions.

ChatMemberRestricted : Object

a chat member that is under certain restrictions in the chat. Supergroups only.

ChatMemberLeft : Object

a chat member that isn't currently a member of the chat, but may join it themselves.

ChatMemberBanned : Object

a chat member that was banned in the chat and can't return to the chat or view chat messages.

ChatPermissions : Object

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

ChatLocation : Object

a location to which a chat is connected.

ReactionType : ReactionTypeEmoji | ReactionTypeCustomEmoji

the type of a reaction. Currently, it can be one of

ReactionTypeEmoji : Object

The reaction is based on an emoji.

ReactionTypeCustomEmoji : Object

The reaction is based on a custom emoji.

ReactionCount : Object

a reaction added to a message along with the number of times it was added.

ForumTopic : Object

represents a forum topic.

BotCommand : Object

represents a bot command.

BotCommandScope : BotCommandScopeDefault | BotCommandScopeAllPrivateChats | BotCommandScopeAllGroupChats | BotCommandScopeAllChatAdministrators | BotCommandScopeChat | BotCommandScopeChatAdministrators | BotCommandScopeChatMember

represents the scope to which bot commands are applied.

BotCommandScopeDefault : Object

the default scope of bot commands.

BotCommandScopeAllPrivateChats : Object

the scope of bot commands, covering all private chats.

BotCommandScopeAllGroupChats : Object

the scope of bot commands, covering all group and supergroup chats.

BotCommandScopeAllChatAdministrators : Object

the scope of bot commands, covering all group and supergroup chat administrators.

BotCommandScopeChat : Object

the scope of bot commands, covering a specific chat.

BotCommandScopeChatAdministrators : Object

the scope of bot commands, covering all administrators of a specific group or supergroup chat.

BotCommandScopeChatMember : Object

the scope of bot commands, covering a specific member of a group or supergroup chat.

BotName : Object

represents the bot's name.

BotDescription : Object

represents the bot's description.

BotShortDescription : Object

the bot's short description.

MenuButton : MenuButtonCommands | MenuButtonWebApp | MenuButtonDefault

the bot's menu button in a private chat.

MenuButtonCommands : Object

a menu button, which opens the bot's list of commands.

MenuButtonWebApp : Object

a menu button, which launches a Web App.

MenuButtonDefault : Object

no specific value for the menu button was set.

ChatBoostSource : ChatBoostSourcePremium | ChatBoostSourceGiftCode | ChatBoostSourceGiveaway

the source of a chat boost.

ChatBoostSourcePremium : Object

The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.

ChatBoostSourceGiftCode : Object

he boost was obtained by the creation of Telegram Premium gift codes to boost a chat.

ChatBoostSourceGiveaway : Object

The boost was obtained by the creation of a Telegram Premium giveaway.

ChatBoost : Object

contains information about a chat boost.

UserChatBoosts : Object

represents a list of boosts added to a chat by a user.

ResponseParameters : Object

Describes why a request was unsuccessful.

InputMedia : InputMediaAnimation | InputMediaDocument | InputMediaAudio | InputMediaPhoto | InputMediaVideo

the content of a media message to be sent.

InputMediaPhoto : Object

a photo to be sent.

InputMediaVideo : Object

a video to be sent.

InputMediaAnimation : Object

an animation file GIF or H.264/MPEG-4 AVC video without sound to be sent.

InputMediaAudio : object

an audio file to be treated as music to be sent.

InputMediaDocument : object

a general file to be sent.

Sticker : object

represents a sticker.

StickerSet : Object

a sticker set.

MaskPosition : Object

the position on faces where a mask should be placed by default.

InputSticker : Object

a sticker to be added to a sticker set.

InlineQueryResultsButton : Object

a button to be shown above inline query results.

InlineQueryResult : InlineQueryResultCachedAudio | InlineQueryResultCachedDocument | InlineQueryResultCachedGif | InlineQueryResultCachedMpeg4Gif | InlineQueryResultCachedPhoto | InlineQueryResultCachedSticker | InlineQueryResultCachedVideo | InlineQueryResultCachedVoice | InlineQueryResultArticle | InlineQueryResultAudio | InlineQueryResultContact | InlineQueryResultGame | InlineQueryResultDocument | InlineQueryResultGif | InlineQueryResultLocation | InlineQueryResultMpeg4Gif | InlineQueryResultPhoto | InlineQueryResultVenue | InlineQueryResultVideo | InlineQueryResultVoice

one result of an inline query.

InlineQueryResultArticle : Object

a link to an article or web page.

InlineQueryResultPhoto : Object

a link to a photo.

InlineQueryResultGif : Object

a link to an animated GIF file.

InlineQueryResultMpeg4Gif : Object

a link to a video animation H.264/MPEG-4 AVC video without sound.

InlineQueryResultVideo : Object

a link to a page containing an embedded video player or a video file.

InlineQueryResultAudio : Object

a link to an MP3 audio file.

InlineQueryResultVoice : Object

a link to a voice recording in an .OGG container encoded with OPUS.

InlineQueryResultDocument : Object

a link to a file.

InlineQueryResultLocation : Object

a location on a map.

InlineQueryResultVenue : Object

a venue. By default, the venue will be sent by the user.

InlineQueryResultContact : Object

a contact with a phone number.

InlineQueryResultGame : Object

a Game.

InlineQueryResultCachedPhoto : Object

a link to a photo stored on the Telegram servers.

InlineQueryResultCachedGif : Object

a link to an animated GIF file stored on the Telegram servers.

InlineQueryResultCachedMpeg4Gif : Object

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

InlineQueryResultCachedSticker : Object

a link to a sticker stored on the Telegram servers.

InlineQueryResultCachedDocument : Object
InlineQueryResultCachedVideo : Object

a link to a video file stored on the Telegram servers.

InlineQueryResultCachedVoice : Object

a link to a voice message stored on the Telegram servers.

InlineQueryResultCachedAudio : Object

a link to an MP3 audio file stored on the Telegram servers.

InputMessageContent : InputTextMessageContent | InputLocationMessageContent | InputVenueMessageContent | InputContactMessageContent | InputInvoiceMessageContent

the content of a message to be sent as a result of an inline query.

InputTextMessageContent : Object

the content of a text message to be sent as the result of an inline query.

InputLocationMessageContent : Object

the content of a location message to be sent as the result of an inline query.

InputVenueMessageContent : Object

the content of a venue message to be sent as the result of an inline query.

InputContactMessageContent : Object

the content of a contact message to be sent as the result of an inline query.

InputInvoiceMessageContent : Object

the content of an invoice message to be sent as the result of an inline query.

SentWebAppMessage : Object

an inline message sent by a Web App on behalf of a user.

answerShippingQuery : Object

If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot.

answerPreCheckoutQuery : Object

Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query.

LabeledPrice : Object

a portion of the price for goods or services.

ShippingAddress : Object

a shipping address.

OrderInfo : Object

information about an order.

ShippingOption : Object

one shipping option.

PassportData : Object

Telegram Passport data shared with the bot by the user.

PassportFile : Object

a file uploaded to Telegram Passport.

EncryptedPassportElement : Object

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

EncryptedCredentials : Object

data required for decrypting and authenticating EncryptedPassportElement.

PassportElementErrorDataField : Object

an issue in one of the data fields that was provided by the user.

PassportElementErrorFrontSide : Object

an issue with the front side of a document.

PassportElementError : PassportElementErrorDataField | PassportElementErrorFrontSide | PassportElementErrorReverseSide | PassportElementErrorSelfie | PassportElementErrorFile | PassportElementErrorFiles | PassportElementErrorTranslationFile | PassportElementErrorTranslationFiles | PassportElementErrorUnspecified

an error in the Telegram Passport element which was submitted that should be resolved by the user.

PassportElementErrorReverseSide : Object

an issue with the reverse side of a document.

PassportElementErrorSelfie : Object

an issue with the selfie with a document.

PassportElementErrorFile : Object

an issue with a document scan.

PassportElementErrorFiles : Object

an issue with a list of scans.

PassportElementErrorTranslationFile : Object

an issue with one of the files that constitute the translation of a document.

PassportElementErrorTranslationFiles : Object

an issue with the translated version of a document.

PassportElementErrorUnspecified : Object

an issue in an unspecified place.

GameHighScore : Object

one row of the high scores table for a game.

SheetOperations : Object

sheet operations.

telesun : Object

main telesun class

Kind: global typedef
Properties

Name Type Description
connectToSpreadSheet function Connects to a Google Spreadsheet using spreadsheet ID.
temporaryMemory function Configures temporary memory for the bot, including cache and session.
permanentMemory function Configures permanent memory for the bot, including cache and session.
handleUpdate function Handles incoming updates from Telegram.
use function Registers a middleware function to be used by the bot.
on function Registers a middleware for a specific update type. The first parameter is one of [message, edited_message, channel_post, edited_channel_post, inline_query, chosen_inline_result, callback_query, shipping_query, pre_checkout_query, poll, poll_answer, my_chat_member, chat_member, chat_join_request, message_reaction, message_reaction_count, chat_boost, removed_chat_boost].
action function Registers a middleware for a specific action.
stage function Registers a middleware for a specific stage.
start function Registers a start command middleware.
help function Registers a help command middleware.
hears function Registers a middleware that triggers on matching text.
contact function Registers a middleware for contact updates.
photo function Registers a middleware for photo updates.
video function Registers a middleware for video updates.
voice function Registers a middleware for voice message updates.
document function Registers a middleware for document updates.
audio function Registers a middleware for audio updates.
text function Registers a middleware for text message updates.
sticker function Registers a middleware for sticker updates.
commands function Registers a middleware for any command.
command function Registers a middleware for a specific command.
handleWebhook function Handles webhook updates.
longPolling function Initiates long polling.
polling function Initiates simple polling.
devHook function Sets up a development webhook.
setWebhook function Configures the webhook for the bot.
deleteWebhook function Deletes the configured webhook.

LongPollingOptions : Object

Options for initiating long polling.

Kind: global typedef
Properties

Name Type Default Description
[sleep] number 1000 The delay between polling requests in milliseconds.
[timeout] number 60 Timeout in seconds for long polling.

PollingOptions : Object

Options for initiating simple polling.

Kind: global typedef
Properties

Name Type Default Description
[limit] number 100 The maximum number of updates to receive.
[timeout] number 60 Timeout in seconds for polling.

DevHookOptions : Object

Options for setting up a development webhook.

Kind: global typedef
Properties

Name Type Description
[certificate] InputFile Your public key certificate file.
[ip_address] string The IP address of the server.
[max_connections] number Maximum allowed number of simultaneous HTTPS connections to the webhook.
[drop_pending_updates] Array.<string> List of types of updates to drop.
[secret_token] string A secret token to authenticate the webhook.
[server] Server The server configuration for the webhook.

SetWebhookOptions : Object

Options for configuring the webhook.

Kind: global typedef
Properties

Name Type Description
url string The HTTPS URL to send updates to.
[certificate] InputFile Your public key certificate file.
[ip_address] string The IP address of the server.
[max_connections] number Maximum allowed number of simultaneous HTTPS connections to the webhook.
[drop_pending_updates] Array.<string> List of types of updates to drop.
[secret_token] string A secret token to authenticate the webhook.

DeleteWebhookOptions : Object

Options for deleting the configured webhook.

Kind: global typedef
Properties

Name Type Description
drop_pending_updates boolean Whether to drop pending updates.

UpdateType : "message" | "edited_message" | "channel_post" | "edited_channel_post" | "inline_query" | "chosen_inline_result" | "callback_query" | "shipping_query" | "pre_checkout_query" | "poll" | "poll_answer" | "my_chat_member" | "chat_member" | "chat_join_request" | "message_reaction" | "message_reaction_count" | "chat_boost" | "removed_chat_boost"

Update types for the 'on' method.

Kind: global typedef

Format : "HTML" | "MarkdownV2"

Formatting options.

Kind: global typedef

UpdateConfig : "webhook" | "polling"

config options for devHook.

Kind: global typedef

Server : "GAS" | "VERCEL" | "RENDER"

server config options for devHook.

Kind: global typedef

Update : Object

Kind: global typedef
Properties

Name Type Description
[message] Message New incoming message of any kind - text, photo, sticker, etc.
[edited_message] Message Message edit notification for known messages.
[channel_post] Message New incoming channel post of any kind - text, photo, sticker, etc.
[edited_channel_post] Message Channel post edit notification for known posts.
[message_reaction] MessageReactionUpdated User changed a message reaction; requires bot as admin.
[message_reaction_count] MessageReactionCountUpdated Grouped anonymous message reaction changes.
[inline_query] InlineQuery New incoming inline query update.
[chosen_inline_result] ChosenInlineResult User's choice from an inline query sent to chat.
[callback_query] CallbackQuery New incoming callback query.
[shipping_query] ShippingQuery New incoming shipping query. Only for invoices with flexible price.
[pre_checkout_query] PreCheckoutQuery New incoming pre-checkout query. Contains full information about checkout.
[poll] Poll Notification of new poll state; for stopped polls and those sent by the bot.
[poll_answer] PollAnswer User changed their vote in a non-anonymous poll sent by the bot.
[my_chat_member] ChatMemberUpdated Bot's chat member status updated in a chat.
[chat_member] ChatMemberUpdated Chat member's status updated; requires bot admin.
[chat_join_request] ChatJoinRequest Chat join request sent; requires bot's can_invite_users right.
[chat_boost] ChatBoostUpdated Chat boost added or changed; requires bot admin.
[removed_chat_boost] ChatBoostRemoved Chat boost removed; requires bot admin.

ForwardMessageOptions : Object

Options for forwarding a single message from one chat to another.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_thread_id] number Unique identifier for the target message thread, only for messages in threads.
from_chat_id number | string Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
message_id number Unique message identifier to forward.
[disable_notification] boolean Sends the message silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the forwarded message from forwarding and saving.

ForwardMessagesOptions : Object

Options for forwarding multiple messages from one chat to another.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username of the target channel (in the format @channelusername).
[message_thread_id] number Unique identifier for the target message thread, only for messages in threads.
from_chat_id number | string Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername).
message_ids Array.<number> Array of unique message identifiers to forward.
[disable_notification] boolean Sends the messages silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the forwarded messages from forwarding and saving.

CopyMessageOptions : Object

Options for copying a single message from one chat to another, potentially with a new caption.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_thread_id] number Unique identifier for the target message thread, only for messages in threads.
from_chat_id number | string Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername).
message_id number Unique message identifier to copy.
[caption] string New caption for the message.
[parse_mode] Format Formatting options for the caption, Markdown or HTML.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the new caption, which can be specified instead of parse_mode.
[disable_notification] boolean Sends the message silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the copied message from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply Additional interface options for the message.

CopyMessagesOptions : Object

Options for copying multiple messages from one chat to another without changing the caption.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_thread_id] number Unique identifier for the target message thread, only for messages in threads.
from_chat_id number | string Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername).
message_ids Array.<number> Array of unique message identifiers to copy.
[disable_notification] boolean Sends the messages silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the copied messages from forwarding and saving.
[remove_caption] boolean Indicates whether to remove the captions of the copied messages.

SendPhotoOptions : Object

Options for sending a photo.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_thread_id] number Unique identifier for the target message thread, only for messages in threads.
photo InputFile | string Photo to send.
[caption] string Photo caption, may also be used when resending photos by file_id.
[parse_mode] Format Format of the caption text: Markdown or HTML.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption, which can be specified instead of parse_mode.
[has_spoiler] boolean Marks the caption as containing a spoiler.
[disable_notification] boolean Sends the photo silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the sent photo from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove the reply keyboard, or to force a reply from the user.

SendAudioOptions : Object

Options for sending an audio file.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username of the target channel.
[message_thread_id] number Unique identifier for the target message thread.
audio InputFile | string Audio file to send.
[caption] string Audio caption, 0-1024 characters after entities parsing.
[parse_mode] Format Format of the caption text: Markdown or HTML.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption, which can be specified instead of parse_mode.
[duration] number Duration of the audio in seconds.
[performer] string Performer of the audio.
[title] string Title of the audio.
[thumbnail] InputFile | string Thumbnail of the file to send.
[disable_notification] boolean Sends the audio silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the sent audio from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove the reply keyboard, or to force a reply from the user.

SendDocumentOptions : Object

Options for sending a document.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username of the target channel.
[message_thread_id] number Unique identifier for the target message thread.
document InputFile | string File to send.
[thumbnail] InputFile | string Thumbnail of the file to send.
[caption] string Document caption, may also be used when resending documents by file_id, 0-1024 characters after entities parsing.
[parse_mode] Format Format of the caption text: Markdown or HTML.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption, which can be specified instead of parse_mode.
[disable_content_type_detection] boolean Disables automatic server-side content type detection for files uploaded using multipart/form-data.
[disable_notification] boolean Sends the document silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the sent document from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove the reply keyboard, or to force a reply from the user.

SendVideoOptions : Object

Options for sending a video.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username of the target channel.
[message_thread_id] number Unique identifier for the target message thread.
video InputFile | string Video to send.
[duration] number Duration of sent video in seconds.
[width] number Video width.
[height] number Video height.
[thumbnail] InputFile | string Thumbnail of the file to send.
[caption] string Video caption, may also be used when resending videos by file_id, 0-1024 characters after entities parsing.
[parse_mode] Format Format of the caption text: Markdown or HTML.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption, which can be specified instead of parse_mode.
[has_spoiler] boolean Marks the caption as containing a spoiler.
[supports_streaming] boolean If the video is suitable for streaming.
[disable_notification] boolean Sends the video silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the sent video from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove the reply keyboard, or to force a reply from the user.

SendAnimationOptions : Object

Options for sending an animation.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_thread_id] number Unique identifier for the target message thread, only for messages in threads.
animation InputFile | string Animation to send.
[duration] number Duration of sent animation in seconds.
[width] number Animation width.
[height] number Animation height.
[thumbnail] InputFile | string Thumbnail of the file to send.
[caption] string Caption for the animation, 0-1024 characters after entities parsing.
[parse_mode] Format Format of the caption text: Markdown or HTML.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption, which can be specified instead of parse_mode.
[has_spoiler] boolean Marks the caption as containing a spoiler.
[disable_notification] boolean Sends the message silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the sent message from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove the reply keyboard, or to force a reply from the user.

SendVoiceOptions : Object

Options for sending a voice message.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_thread_id] number Unique identifier for the target message thread, only for messages in threads.
voice InputFile | string Audio file to send as a voice message.
[caption] string Caption for the voice message, 0-1024 characters after entities parsing.
[parse_mode] Format Format of the caption text: Markdown or HTML.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption, which can be specified instead of parse_mode.
[duration] number Duration of the voice message in seconds.
[disable_notification] boolean Sends the message silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the sent message from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove the reply keyboard, or to force a reply from the user.

SendVideoNoteOptions : Object

Options for sending a video note.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_thread_id] number Unique identifier for the target message thread, only for messages in threads.
video_note InputFile | string Video note to send.
[duration] number Duration of the video note in seconds.
[length] number Video width and height, since video notes are square-shaped.
[thumbnail] InputFile | string Thumbnail of the file to send.
[disable_notification] boolean Sends the message silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the sent message from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove the reply keyboard, or to force a reply from the user.

SendMediaGroupOptions : Object

Options for sending a media group.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_thread_id] number Unique identifier for the target message thread, only for messages in threads.
media Array.<InputMediaAudio> | Array.<InputMediaDocument> | Array.<InputMediaPhoto> | Array.<InputMediaVideo> A JSON-serialized array describing photos, videos, documents, or audios to be sent, making up a media group.
[disable_notification] boolean Sends the messages silently. Users will receive notifications with no sound.
[protect_content] boolean Protects the content of the sent messages from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.

SendLocationOptions : Object

Options for sending a location message.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_thread_id] number Unique identifier for the target message thread, only for messages in threads.
latitude number Latitude of the location.
longitude number Longitude of the location.
[horizontal_accuracy] number The radius of uncertainty for the location, measured in meters; 0-1500.
[live_period] number Time in seconds for which the location will be live, ranging from 60 to 86400.
[heading] number For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
[proximity_alert_radius] number For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
[disable_notification] boolean Sends the message silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the sent message from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove the reply keyboard, or to force a reply from the user.

SendVenueOptions : Object

Options for sending a venue message.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_thread_id] number Unique identifier for the target message thread, only for messages in threads.
latitude number Latitude of the venue.
longitude number Longitude of the venue.
title string Name of the venue.
address string Address of the venue.
[foursquare_id] string Foursquare identifier of the venue.
[foursquare_type] string Foursquare type of the venue., For example, arts_entertainment/default, arts_entertainment/aquarium or food/icecream.)
[google_place_id] string Google Places identifier of the venue.
[google_place_type] string Google Places type of the venue., See Google Places API for supported types.)
[disable_notification] boolean Sends the message silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the sent message from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove the reply keyboard, or to force a reply from the user.

SendContactOptions : Object

Options for sending a contact message.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_thread_id] number Unique identifier for the target message thread, only for messages in threads.
phone_number string Contact's phone number.
first_name string Contact's first name.
[last_name] string Contact's last name.
[vcard] string Additional data about the contact in the form of a vCard, 0-2048 bytes.
[disable_notification] boolean Sends the message silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the sent message from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove the reply keyboard, or to force a reply from the user.

SendPollOptions : Object

Options for sending a poll.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_thread_id] number Unique identifier for the target message thread, only for messages in threads.
question string Poll question, 1-300 characters.
options Array.<string> List of answer options, 2-10 strings 1-100 characters each.
[is_anonymous] boolean True, if the poll needs to be anonymous.
[type] string Poll type, ΓÇ£quizΓÇ¥ or ΓÇ£regularΓÇ¥, defaults to ΓÇ£regularΓÇ¥.
[allows_multiple_answers] boolean True, if the poll allows multiple answers, ignored for quizzes.
[correct_option_id] number 0-based identifier of the correct answer option, required for quizzes.
[explanation] string Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with the possibility to include entities.
[explanation_parse_mode] Format Mode for parsing entities in the explanation. See formatting options for more details.
[explanation_entities] Array.<MessageEntity> List of special entities that appear in the explanation, which can be specified instead of parse_mode.
[open_period] number Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.
[close_date] number Point in time, Unix timestamp) when the poll will be automatically closed. Can't be used together with open_period.
[is_closed] boolean Pass True, if the poll needs to be immediately closed. This can be useful for poll preview.
[disable_notification] boolean Sends the message silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the sent message from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove the reply keyboard, or to force a reply from the user.

SendDiceOptions : Object

Options for sending a dice message.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_thread_id] number Unique identifier for the target message thread, only for messages in threads.
[emoji] string Emoji on which the dice throw animation is based.
[disable_notification] boolean Sends the message silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the sent message from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply Additional interface options for the message.

SendChatActionOptions : Object

Options for sending chat action.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_thread_id] number Unique identifier for the target message thread, only for messages in threads.
action string Type of action to broadcast.

SetMessageReactionOptions : Object

Options for setting message reaction.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
message_id number Identifier of the message to add the reaction to.
[reaction] Array.<ReactionType> Types of reactions to set on the message.
[is_big] boolean Whether the reaction should be displayed in a larger format.

GetUserProfilePhotosOptions : Object

Options for getting a user's profile photos.

Kind: global typedef
Properties

Name Type Description
user_id number Unique identifier of the target user.
[offset] number Sequential number of the first photo to be returned.
[limit] number Limits the number of photos to be retrieved.

GetFileOptions : Object

Options for getting file information.

Kind: global typedef
Properties

Name Type Description
file_id string File identifier to get info about.

BanChatMemberOptions : Object

Options for banning a chat member.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
user_id number Unique identifier of the target user to be banned.
[until_date] number Date when the ban will be lifted. Unix time.
[revoke_messages] boolean Pass True to delete all messages from the chat for the user that is being removed.

UnbanChatMemberOptions : Object

Options for unbanning a previously banned user in a supergroup or channel.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
user_id number Unique identifier of the target user.
[only_if_banned] boolean Do the unban action only if the user is currently banned.

RestrictChatMemberOptions : Object

Options for restricting a user in a supergroup.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
user_id number Unique identifier of the target user to restrict.
permissions ChatPermissions Permissions to be set for the restricted user.
[use_independent_chat_permissions] boolean Use independent permissions for the chat.
[until_date] number Date when restrictions will be lifted for the user, unix time.

SetChatAdministratorCustomTitleOptions : Object

Options for promoting or demoting a user in a supergroup or channel.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
user_id number Unique identifier of the target user to promote or demote.
[is_anonymous] boolean The user's presence in chat is hidden.
[can_manage_chat] boolean The user can access the chat event log, chat statistics, message statistics in channels, see channel members, manage voice chats.
[can_delete_messages] boolean The user can delete messages of other users.
[can_manage_video_chats] boolean The user can manage video chats.
[can_restrict_members] boolean The user can restrict, ban or unban chat members.
[can_promote_members] boolean The user can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly, promoted by administrators that were appointed by the user.
[can_change_info] boolean The user can change the chat title, photo, and other settings.
[can_invite_users] boolean The user can invite new users to the chat.
[can_post_messages] boolean The user can post in the channel.
[can_edit_messages] boolean The user can edit messages of others and can pin messages.
[can_pin_messages] boolean The user can pin messages. /** Options for setting a custom title for an administrator in a supergroup.
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
user_id number Unique identifier of the target user to set a custom title.
custom_title string New custom title for the administrator; 0-16 characters, emoji are not allowed.

BanChatSenderChatOptions : Object

Options for banning a channel chat in a supergroup or channel.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
sender_chat_id number Unique identifier of the target sender chat to ban.

UnbanChatSenderChatOptions : Object

Options for unbanning a previously banned channel chat.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
sender_chat_id number Unique identifier of the target sender chat to unban.

SetChatPermissionsOptions : Object

Options for setting default chat permissions for all members.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
permissions ChatPermissions New default chat permissions to set.
[use_independent_chat_permissions] boolean Specifies whether the chat supports independent default chat permissions for channels and supergroups.

ExportChatInviteLinkOptions : Object

Options for generating a new primary invite link for a chat.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).

CreateChatInviteLinkOptions : Object

Options for creating an additional invite link for a chat.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
[name] string Invite link name.
[expire_date] number Date when the link will expire.
[member_limit] number Maximum number of users that can be invited.
[creates_join_request] boolean True, if the link should create a join request instead of immediately joining the chat.

EditChatInviteLinkOptions : Object

Options for editing a non-primary invite link created by the bot.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
invite_link string The invite link to edit.
[name] string New name for the invite link.
[expire_date] number New expiration date for the invite link.
[member_limit] number New maximum number of users that can be invited with the link.
[creates_join_request] boolean True, if the link should now create a join request instead of immediately joining the chat.

RevokeChatInviteLinkOptions : Object

Options for revoking an invite link created by the bot.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
invite_link string The invite link to revoke.

ChatJoinRequestOptions : Object

Options for managing a chat join request.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
user_id number Unique identifier of the target user.

SetChatPhotoOptions : Object

Options for setting a new chat photo.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
photo InputFile New chat photo.

deleteChatPhotoOptions : Object

Basic options for operations on a chat.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).

SetChatTitleOptions : Object

Options for changing the title of a chat.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
title string New chat title.

SetChatDescriptionOptions : Object

Options for changing the description of a chat.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
[description] string New chat description.

PinChatMessageOptions : Object

Options for pinning a message in a chat.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
message_id number Identifier of a message to pin.
[disable_notification] boolean If true, the message will be pinned silently. This means users will not receive a notification.

UnpinChatMessageOptions : Object

Options for unpinning a chat message.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_id] number Identifier of a message to unpin. If not specified, the most recent pinned message, by sending date) will be unpinned.

ChatIdOptions : Object

Options requiring only a chat ID.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).

GetChatMemberOptions : Object

Options for getting information about a chat member.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
user_id number Unique identifier of the target user.

GetChatMemberOptions : Object

Options for getting information about a member of a chat.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
user_id number Unique identifier of the target user.

SetChatStickerSetOptions : Object

Options for setting a new group sticker set for a supergroup.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
sticker_set_name string Name of the sticker set to be set as the group sticker set.

CreateForumTopicOptions : Object

Options for creating a topic in a forum supergroup chat.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
name string Name of the forum topic.
[icon_color] number Color of the forum topic icon.
[icon_custom_emoji_id] string Custom emoji identifier to be used as the icon of the forum topic.

EditForumTopicOptions : Object

Options for editing the name and icon of a forum topic.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
message_thread_id number Unique identifier for the target message thread.
[name] string New name for the forum topic.
[icon_custom_emoji_id] string Custom emoji identifier to be used as the new icon of the forum topic.

ForumTopicManagementOptions : Object

Options for closing or reopening a topic in a forum supergroup chat.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
message_thread_id number Unique identifier for the target message thread.

EditGeneralForumTopicOptions : Object

Options for editing the name of the 'General' topic in a forum supergroup chat.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
name string New name for the 'General' topic.

AnswerCallbackQueryOptions : Object

Options for sending answers to callback queries sent from inline keyboards.

Kind: global typedef
Properties

Name Type Description
callback_query_id string Unique identifier for the query to be answered.
[text] string Text of the notification. If not specified, nothing will be shown to the user.
[show_alert] boolean If true, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.
[url] string URL that will be opened by the user's client.
[cache_time] number The maximum amount of time in seconds that the result of the callback query may be cached client-side.

GetUserChatBoostsOptions : Object

Options for getting the list of boosts added to a chat by a user.

Kind: global typedef
Properties

Name Type Description
chat_id number | string The unique identifier for the target chat or username of the target channel.
user_id number Unique identifier of the user whose boosts are being requested.

SetMyCommandsOptions : Object

Options for changing the list of the bot's commands.

Kind: global typedef
Properties

Name Type Description
commands Array.<BotCommand> An array of bot commands to be set.
[scope] BotCommandScope A JSON-serialized object defining the scope of commands. If not specified, defaults to all private chats.
[language_code] string A two-letter ISO 639-1 language code. If not specified, commands will be applied to all languages.

DeleteMyCommandsOptions : Object

Options for deleting the bot's commands for a given scope and language.

Kind: global typedef
Properties

Name Type Description
[scope] BotCommandScope A JSON-serialized object defining the scope of commands to be deleted. If not specified, commands will be deleted in all private chats.
[language_code] string A two-letter ISO 639-1 language code. If not specified, commands will be deleted for all languages.

GetMyCommandsOptions : Object

Options for getting the list of the bot's commands.

Kind: global typedef
Properties

Name Type Description
[scope] BotCommandScope The scope of commands to retrieve. If not specified, defaults to all commands.
[language_code] string A language code to specify which language's commands to retrieve. If not specified, defaults to all languages.

SetMyNameOptions : Object

Options for setting the bot's name.

Kind: global typedef
Properties

Name Type Description
name string The new name to set for the bot.
[language_code] string A language code. If specified, sets the name for that specific language.

GetMyNameOptions : Object

Options for getting the bot's name.

Kind: global typedef
Properties

Name Type Description
[language_code] string A language code to specify which language's name to retrieve. If not specified, gets the default name.

GetMyDescriptionOptions : Object

Options for getting the bot's description.

Kind: global typedef
Properties

Name Type Description
[language_code] string A language code to specify which language's description to retrieve. If not specified, gets the default description.

SetMyDescriptionOptions : Object

Options for setting the bot's description.

Kind: global typedef
Properties

Name Type Description
[description] string The new description to set for the bot.
[language_code] string A language code. If specified, sets the description for that specific language.

GetMyShortDescriptionOptions : Object

Options for getting the bot's short description.

Kind: global typedef
Properties

Name Type Description
[language_code] string A language code to specify which language's short description to retrieve. If not specified, gets the default short description.

SetChatMenuButtonOptions : Object

Options for setting the chat menu button.

Kind: global typedef
Properties

Name Type Description
[chat_id] number Unique identifier for the target chat or username (in the format @channelusername).
[menu_button] MenuButton The menu button to be set. If not specified, the button is removed.

GetChatMenuButtonOptions : Object

Options for getting the chat menu button.

Kind: global typedef
Properties

Name Type Description
[chat_id] number Unique identifier for the target chat or username (in the format @channelusername).

SetMyDefaultAdministratorRightsOptions : Object

Options for setting the bot's default administrator rights.

Kind: global typedef
Properties

Name Type Description
[rights] ChatAdministratorRights The default administrator rights to be set.
[for_channels] boolean Specifies whether the rights are for channels. Defaults to false, for groups.

GetMyDefaultAdministratorRightsOptions : Object

Options for getting the bot's default administrator rights.

Kind: global typedef
Properties

Name Type Description
[for_channels] boolean Specifies whether to get the rights for channels. Defaults to false, for groups.

EditMessageTextOptions : Object

Options for editing the text of messages.

Kind: global typedef
Properties

Name Type Description
[chat_id] number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_id] number Identifier of the message to edit.
[inline_message_id] string Identifier of the inline message to edit.
text string New text of the message.
[parse_mode] Format Format of the text: Markdown or HTML.
[entities] Array.<MessageEntity> List of special entities that appear in the message text, which can be specified instead of parse_mode.
[link_preview_options] LinkPreviewOptions Options for how links in the message should be previewed.
[reply_markup] InlineKeyboardMarkup Additional interface options. A JSON-serialized object for an inline keyboard.

EditMessageCaptionOptions : Object

Options for editing the caption of a message.

Kind: global typedef
Properties

Name Type Description
[chat_id] number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_id] number Identifier of the message to edit.
[inline_message_id] string Identifier of the inline message.
[caption] string New caption of the message.
[parse_mode] Format Format of the caption text: Markdown or HTML.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption, which can be specified instead of parse_mode.
[reply_markup] InlineKeyboardMarkup A JSON-serialized object for an inline keyboard.

EditMessageMediaOptions : Object

Options for editing the media content of messages.

Kind: global typedef
Properties

Name Type Description
[chat_id] number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_id] number Identifier of the message to edit.
[inline_message_id] string Identifier of the inline message.
media InputMedia New media content of the message.
[reply_markup] InlineKeyboardMarkup A JSON-serialized object for an inline keyboard.

EditMessageLiveLocationOptions : Object

Options for editing the live location of a message.

Kind: global typedef
Properties

Name Type Description
[chat_id] number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_id] number Identifier of the message to edit.
[inline_message_id] string Identifier of the inline message.
latitude number Latitude of new location.
longitude number Longitude of new location.
[horizontal_accuracy] number The radius of uncertainty for the location, measured in meters; 0-1500.
[heading] number Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
[proximity_alert_radius] number Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
[reply_markup] InlineKeyboardMarkup A JSON-serialized object for an inline keyboard.

StopMessageLiveLocationOptions : Object

Options for stopping a live location message.

Kind: global typedef
Properties

Name Type Description
[chat_id] number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_id] number Identifier of the message to stop showing the live location.
[inline_message_id] string Identifier of the inline message to stop showing the live location.
[reply_markup] InlineKeyboardMarkup A JSON-serialized object for an inline keyboard.

StopMessageLiveLocationOptions : Object

Options for stopping a live location message.

Kind: global typedef
Properties

Name Type Description
[chat_id] number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_id] number Identifier of the message with live location to stop.
[inline_message_id] string Identifier of the inline message with live location to stop.
[reply_markup] InlineKeyboardMarkup A JSON-serialized object for a new inline keyboard.

EditMessageReplyMarkupOptions : Object

Options for editing the reply markup of messages.

Kind: global typedef
Properties

Name Type Description
[chat_id] number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_id] number Identifier of the message to edit.
[inline_message_id] string Identifier of the inline message to edit.
[reply_markup] InlineKeyboardMarkup A JSON-serialized object for a new inline keyboard.

StopPollOptions : Object

Options for stopping a poll.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
message_id number Identifier of the original message with the poll.
[reply_markup] InlineKeyboardMarkup A JSON-serialized object for a new inline keyboard.

DeleteMessageOptions : Object

Options for deleting a message.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
message_id number Identifier of the message to delete.

DeleteMessagesOptions : Object

Options for deleting multiple messages.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
message_ids Array.<number> Array of message identifiers to delete.

SendStickerOptions : Object

Options for sending a sticker.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_thread_id] number Unique identifier for the target message thread, only for messages in threads.
sticker InputFile | string Sticker to send. Can be a file_id as String to send a sticker that exists on the Telegram servers, or a file from the filesystem.
[emoji] string Emoji associated with the sticker.
[disable_notification] boolean Sends the sticker silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the sent sticker from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard, or to force a reply from the user.

GetStickerSetOptions : Object

Options for getting a sticker set.

Kind: global typedef
Properties

Name Type Description
name string Name of the sticker set.

GetCustomEmojiStickersOptions : Object

Options for getting custom emoji stickers.

Kind: global typedef
Properties

Name Type Description
custom_emoji_ids Array.<string> List of custom emoji identifiers to get stickers for.

UploadStickerFileOptions : Object

Options for uploading a sticker file.

Kind: global typedef
Properties

Name Type Description
user_id number User identifier of the sticker file owner.
sticker InputFile Sticker file to upload.
sticker_format string Format of the sticker file, e.g., webp.

CreateNewStickerSetOptions : Object

Options for creating a new sticker set.

Kind: global typedef
Properties

Name Type Description
user_id number User identifier of the sticker set owner.
name string Unique name of the sticker set.
title string Sticker set title, 1-64 characters.
stickers Array.<InputSticker> Array of stickers to be added to the set.
sticker_format string Format of the stickers in the set, e.g., webp.
[sticker_type] string Type of the stickers in the set.
[needs_repainting] boolean True if the sticker set needs repainting.

AddStickerToSetOptions : Object

Options for adding a new sticker to a set.

Kind: global typedef
Properties

Name Type Description
user_id number Unique identifier of the target user.
name string Name of the sticker set to which the sticker will be added.
sticker InputSticker The sticker to be added to the set.

SetStickerPositionInSetOptions : Object

Options for setting the position of a sticker in the set.

Kind: global typedef
Properties

Name Type Description
sticker string File identifier of the sticker.
position number New sticker position in the set, zero-based.

DeleteStickerFromSetOptions : Object

Options for deleting a sticker from a set.

Kind: global typedef
Properties

Name Type Description
sticker string File identifier of the sticker to be deleted.

SetStickerEmojiListOptions : Object

Options for setting the emoji list for a sticker.

Kind: global typedef
Properties

Name Type Description
sticker string File identifier of the sticker.
emoji_list Array.<string> A list of emojis associated with the sticker.

SetStickerKeywordsOptions : Object

Options for setting keywords for a sticker.

Kind: global typedef
Properties

Name Type Description
sticker string File identifier of the sticker.
[keywords] Array.<string> A list of keywords associated with the sticker.

SetStickerMaskPositionOptions : Object

Options for setting the mask position of a sticker.

Kind: global typedef
Properties

Name Type Description
sticker string File identifier of the sticker.
[mask_position] MaskPosition The mask position to be set for the sticker.

SetStickerSetTitleOptions : Object

Options for setting the title of a sticker set.

Kind: global typedef
Properties

Name Type Description
name string The name of the sticker set.
title string The new title of the sticker set.

SetStickerSetThumbnailOptions : Object

Options for setting the thumbnail of a sticker set.

Kind: global typedef
Properties

Name Type Description
name string The name of the sticker set.
user_id number The user ID of the sticker set owner.
[thumbnail] InputFile | string The new thumbnail of the sticker set. Can be a file ID or an actual file.

SetCustomEmojiStickerSetThumbnailOptions : Object

Options for setting the thumbnail of a custom emoji sticker set.

Kind: global typedef
Properties

Name Type Description
name string The name of the custom emoji sticker set.
[custom_emoji_id] string The ID of the custom emoji to be used as the new thumbnail.

DeleteStickerSetOptions : Object

Options for deleting a sticker set.

Kind: global typedef
Properties

Name Type Description
name string The name of the sticker set to be deleted.

AnswerInlineQueryOptions : Object

Options for answering an inline query.

Kind: global typedef
Properties

Name Type Description
inline_query_id string Unique identifier for the answered query.
results Array.<InlineQueryResult> A JSON-serialized array of results for the inline query.
[cache_time] number The maximum amount of time in seconds that the result of the inline query may be cached on the server.
[is_personal] boolean Pass true if results may be cached on the server side only for the user that sent the query.
[next_offset] string Pass the offset that a client should send in the next query with the same text to receive more results.
[button] InlineQueryResultsButton An optional button that will be shown to the user in the results.

AnswerWebAppQueryOptions : Object

Options for answering a Web App query.

Kind: global typedef
Properties

Name Type Description
web_app_query_id string Unique identifier for the query to be answered.
result InlineQueryResult The result for the query.

SendInvoiceOptions : Object

Options for sending an invoice.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username of the target channel.
[message_thread_id] number Unique identifier for the target message thread, only for channels.
title string Product name.
description string Product description.
payload string Bot-defined invoice payload.
provider_token string Payments provider token.
currency string Three-letter ISO 4217 currency code.
prices Array.<LabeledPrice> Price breakdown, a list of components.
[max_tip_amount] number The maximum accepted tip amount in the smallest units of the currency.
[suggested_tip_amounts] Array.<number> Array of suggested tip amounts in the smallest units of the currency.
[start_parameter] string Unique deep-linking parameter for the payment checkout.
[provider_data] string JSON-encoded data about the invoice, which will be shared with the payment provider.
[photo_url] string URL of the product photo for the invoice.
[photo_size] number Size of the product photo.
[photo_width] number Width of the product photo.
[photo_height] number Height of the product photo.
[need_name] boolean Whether you need the user's full name.
[need_phone_number] boolean Whether you need the user's phone number.
[need_email] boolean Whether you need the user's email.
[need_shipping_address] boolean Whether you need the user's shipping address.
[send_phone_number_to_provider] boolean Whether the user's phone number should be sent to provider.
[send_email_to_provider] boolean Whether the user's email should be sent to provider.
[is_flexible] boolean Whether the final price depends on the shipping method.
[disable_notification] boolean Sends the invoice silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the sent invoice from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove the reply keyboard, or to force a reply from the user.

CreateInvoiceLinkOptions : Object

Options for creating an invoice link.

Kind: global typedef
Properties

Name Type Description
title string Product name.
description string Product description.
payload string Bot-defined invoice payload.
provider_token string Payments provider token.
currency string Three-letter ISO 4217 currency code.
prices Array.<LabeledPrice> Price breakdown, a list of components.
[max_tip_amount] number The maximum accepted tip amount in the smallest units of the currency.
[suggested_tip_amounts] Array.<number> Array of suggested tip amounts in the smallest units of the currency.
[provider_data] string JSON-encoded data about the invoice, which will be shared with the payment provider.
[photo_url] string URL of the product photo for the invoice.
[photo_size] number Size of the product photo.
[photo_width] number Width of the product photo.
[photo_height] number Height of the product photo.
[need_name] boolean Whether you need the user's full name.
[need_phone_number] boolean Whether you need the user's phone number.
[need_email] boolean Whether you need the user's email.
[need_shipping_address] boolean Whether you need the user's shipping address.
[send_phone_number_to_provider] boolean Whether the user's phone number should be sent to provider.
[send_email_to_provider] boolean Whether the user's email should be sent to provider.
[is_flexible] boolean Whether the final price depends on the shipping method.

SendGameOptions : Object

Options for sending a game.

Kind: global typedef
Properties

Name Type Description
chat_id number Unique identifier for the target chat.
game_short_name string Short name of the game to be sent.
[message_thread_id] number Unique identifier for the target message thread, only for messages in threads.
[disable_notification] boolean Sends the game message silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the sent game from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup A JSON-serialized object for an inline keyboard. If empty, one Play game_title button will be shown. If not empty, the first button must launch the game.

SetGameScoreOptions : Object

Options for setting a user's score in a game.

Kind: global typedef
Properties

Name Type Description
user_id number User identifier.
score number New score to set.
[force] boolean Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters.
[disable_edit_message] boolean Pass True, if the game message should not be automatically edited to include the current scoreboard.
[chat_id] number Required if inline_message_id is not specified. Unique identifier for the target chat.
[message_id] number Required if inline_message_id is not specified. Identifier of the sent message.
[inline_message_id] string Required if chat_id and message_id are not specified. Identifier of the inline message.

GetGameHighScoresOptions : Object

Options for retrieving high scores for a game.

Kind: global typedef
Properties

Name Type Description
user_id number User identifier.
[chat_id] number Required if inline_message_id is not specified. Unique identifier for the target chat.
[message_id] number Required if inline_message_id is not specified. Identifier of the sent message.
[inline_message_id] string Required if chat_id and message_id are not specified. Identifier of the inline message.

SetPassportDataErrorsOptions : Object

Options for informing a user of errors with their Telegram Passport data.

Kind: global typedef
Properties

Name Type Description
user_id number User identifier.
errors Array.<PassportElementError> An array of objects representing errors in the Telegram Passport elements that the user needs to correct.

ctx : Object

Kind: global typedef
Properties

Name Type Description
update function incoming update.
message function New incoming message of any kind - text, photo, sticker, etc.
editedMessage function Message edit notification for known messages.
channelPost function New incoming channel post of any kind - text, photo, sticker, etc.
editedChannelPost function Channel post edit notification for known posts.
messageReaction function User changed a message reaction; requires bot as admin.
messageReactionCount function Grouped anonymous message reaction changes.
inlineQuery function New incoming inline query
chosenInlineResult function User's choice from an inline query sent to chat.
callbackQuery function New incoming callback query
shippingQuery function New incoming shipping query. Only for invoices with flexible price
preCheckoutQuery function New incoming pre-checkout query. Contains full information about checkout.
poll function Notification of new poll state; for stopped polls and those sent by the bot.
pollAnswer function User changed their vote in a non-anonymous poll sent by the bot.
myChatMember function Bot's chat member status updated in a chat.
chatMember function Chat member's status updated; requires bot admin.
chatJoinRequest function Chat join request sent; requires bot's can_invite_users right.
chatBoost function Chat boost added or changed; requires bot admin.
removedChatBoost function Chat boost removed; requires bot admin.
updateType function get update type.
chat function chat.
from function user or bot.
chatId function Unique identifier of chat.
userId function Unique identifier of user.
messageId function Unique identifier of message.
getMe function for testing your bot's authentication token
logOut function Use this method to log out from the cloud Bot API server before launching the bot locally
close function Use this method to close the bot instance before moving it from one local server to another.
getWebhookInfo function the current status of a webhook.
sheet function Method to access sheet operations by sheet name.
sendMessage function send text messages.
forwardMessage function forward messages of any kind.
forwardMessages function forward multiple messages of any kind.
copyMessage function copy messages of any kind.
copyMessages function Copies messages of any kind.
sendPhoto function Sends photos.
sendAudio function Sends an audio file.
sendDocument function Sends a general file.
sendVideo function Sends a video file.
sendAnimation function Sends an animation file.
sendVoice function Sends an audio file as a voice message.
sendVideoNote function Sends a video message.
sendMediaGroup function Sends a group of photos, videos, documents or audios as an album.
sendLocation function Sends point on the map.
sendVenue function Sends information about a venue.
sendContact function Sends phone contacts.
sendPoll function Sends a native poll.
sendDice function Sends an animated emoji that will display a random value.
sendChatAction function Tells the user that something is happening on the bot's side.
setMessageReaction function Changes the chosen reactions on a message.
getUserProfilePhotos function Gets a list of profile pictures for a user.
getFile function Gets basic information about a file.
banChatMember function Bans a user in a group, supergroup, or channel.
unbanChatMember function Unbans a previously banned user in a supergroup or channel.
restrictChatMember function Restricts a user in a supergroup.
promoteChatMember function Promotes or demotes a user in a supergroup or channel.
setChatAdministratorCustomTitle function Sets a custom title for an administrator in a supergroup.
banChatSenderChat function Bans a channel chat in a supergroup or channel.
unbanChatSenderChat function Unbans a previously banned channel chat.
setChatPermissions function Sets default chat permissions for all members.
exportChatInviteLink function Generates a new primary invite link for a chat.
createChatInviteLink function Creates an additional invite link for a chat.
editChatInviteLink function Edits a non-primary invite link created by the bot.
revokeChatInviteLink function Revokes an invite link created by the bot.
approveChatJoinRequest function Approves a chat join request.
declineChatJoinRequest function Declines a chat join request.
setChatPhoto function Sets a new chat photo.
deleteChatPhoto function Deletes the chat photo.
setChatTitle function Changes the title of a chat.
setChatDescription function Changes the description of a chat.
pinChatMessage function Pins a message in a chat.
unpinChatMessage function Removes a message from the list of pinned messages in a chat.
unpinAllChatMessages function Clears the list of pinned messages in a chat.
leaveChat function Bot leaves a group, supergroup, or channel.
getChat function Gets information about the chat.
getChatAdministrators function Gets a list of administrators in a chat.
getChatMemberCount function Gets the number of members in a chat.
getChatMember function Gets information about a member of a chat.
setChatStickerSet function Sets a new group sticker set for a supergroup.
deleteChatStickerSet function Deletes a group sticker set from a supergroup.
getForumTopicIconStickers function Gets custom emoji stickers for forum topic icons.
createForumTopic function Creates a topic in a forum supergroup chat.
editForumTopic function Edits name and icon of a forum topic.
closeForumTopic function Closes an open topic in a forum supergroup chat.
reopenForumTopic function Reopens a closed topic in a forum supergroup chat.
deleteForumTopic function Deletes a forum topic along with all its messages in a forum supergroup chat.
unpinAllForumTopicMessages function Clears the list of pinned messages in a forum topic.
editGeneralForumTopic function Edits the name of the 'General' topic in a forum supergroup chat.
closeGeneralForumTopic function Closes an open 'General' topic in a forum supergroup chat.
reopenGeneralForumTopic function Reopens a closed 'General' topic in a forum supergroup chat.
hideGeneralForumTopic function Hides the 'General' topic in a forum supergroup chat.
unhideGeneralForumTopic function Unhides the 'General' topic in a forum supergroup chat.
unpinAllGeneralForumTopicMessages function Clears the list of pinned messages in a General forum topic.
answerCallbackQuery function Sends answers to callback queries sent from inline keyboards.
getUserChatBoosts function Gets the list of boosts added to a chat by a user.
setMyCommands function Changes the list of the bot's commands.
deleteMyCommands function Deletes the bot's commands for a given scope and language.
getMyCommands function Gets the current list of the bot's commands.
setMyName function Changes the bot's name.
getMyName function Gets the current bot name.
setMyDescription function Changes the bot's description.
getMyDescription function Gets the current bot description.
setMyShortDescription function Changes the bot's short description.
getMyShortDescription function Gets the current bot short description.
setChatMenuButton function Changes the bot's menu button.
getChatMenuButton function Gets the current bot's menu button.
setMyDefaultAdministratorRights function Changes the default administrator rights.
getMyDefaultAdministratorRights function Gets the current default administrator rights.
editMessageText function Edits text and game messages.
editMessageCaption function Edits captions of messages.
editMessageMedia function Edits animation, audio, document, photo or video messages.
editMessageLiveLocation function Edits live location messages.
stopMessageLiveLocation function Stops updating a live location message.
editMessageReplyMarkup function Edits only the reply markup of messages.
stopPoll function Stops a poll.
deleteMessage function Deletes a message.
deleteMessages function Deletes multiple messages.
sendSticker function Sends a sticker.
getStickerSet function Gets a sticker set.
getCustomEmojiStickers function Gets information about custom emoji stickers.
uploadStickerFile function Uploads a sticker file.
createNewStickerSet function Creates a new sticker set.
addStickerToSet function Adds a new sticker to a set.
setStickerPositionInSet function move a sticker in a set.
deleteStickerFromSet function delete a sticker from a set.
setStickerEmojiList function change the list of emoji assigned to a regular or custom emoji sticker.
setStickerKeywords function change search keywords assigned to a regular or custom emoji sticker.
setStickerMaskPosition function change the mask position of a mask sticker.
setStickerSetTitle function set the title of a created sticker set.
setStickerSetThumbnail function set the thumbnail of a regular or mask sticker set.
setCustomEmojiStickerSetThumbnail function set the thumbnail of a custom emoji sticker set.
deleteStickerSet function delete a sticker set.
answerInlineQuery function send answers to an inline query.
answerWebAppQuery function set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated.
sendInvoice function send invoices.
createInvoiceLink function create a link for an invoice.
sendGame function send a game.
setGameScore function set the score of the specified user in a game message.
getGameHighScores function get data for high score tables.
setPassportDataErrors function Informs user of errors in Telegram Passport elements.
reply function
replyWithHtml function
replyWithMarkdown function
replyWithPhoto function reply photo to the current chat.
replyWithChatAction function reply chat action to the current chat.
replyWithEditedMessage function reply edited message to the current chat.
getTSession function Gets the temporary session object.
getTSessionValue function Gets a value from the temporary session by key.
setTSessionValue function Sets a value in the temporary session with an optional expiry time.
setTSessionValues function Sets multiple values in the temporary session with an optional expiry time.
removeTSessionValue function Removes a value from the temporary session by key.
deleteTSession function Deletes the temporary session.
setStage function Sets the current stage.
clearStage function Clears the current stage.
getStage function Gets the current stage.
getPSession function Gets the persistent session object.
getPSessionValue function Gets a value from the persistent session by key.
setPSessionValue function Sets a value in the persistent session.
setPSessionValues function Sets multiple values in the persistent session.
removePSessionValue function Removes a value from the persistent session by key.
deletePSession function Deletes the persistent session.
getPCacheValue function Gets a value from the persistent cache by key.
getPCache function Gets the entire persistent cache object.
setPCacheValue function Sets a value in the persistent cache.
setPCacheValues function Sets multiple values in the persistent cache.
removePCacheValue function Removes a value from the persistent cache by key.
deletePCache function Deletes the persistent cache.
getTCacheValue function Gets a value from the temporary cache by key.
setTCacheValue function Sets a value in the temporary cache with an optional expiry time.
getTCacheValues function Gets multiple values from the temporary cache.
setTCacheValues function Sets multiple values in the temporary cache with an optional expiry time.
removeTCacheValue function Removes a value from the temporary cache by key.
removeTCacheValues function Removes multiple values from the temporary cache.
sendEmail function Sends an email with optional parameters.

ReplyOptions : Object

Options for replying with a message.

Kind: global typedef
Properties

Name Type Description
text string Text of the message to be sent.
[parse_mode] Format Format of the text: Markdown or HTML.
[entities] Array.<MessageEntity> List of special entities that appear in message text, which can be specified instead of parse_mode.
[link_preview_options] LinkPreviewOptions Options for how links in the message should be previewed.
[disable_notification] boolean Sends the message silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the sent message from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove the reply keyboard, or to force a reply from the user.

SendMessageOptions : Object

Options for sending a message to a chat.

Kind: global typedef
Properties

Name Type Description
chat_id number | string Unique identifier for the target chat or username (in the format @channelusername).
[message_thread_id] number Unique identifier for the target message thread.
text string Text of the message to be sent.
[parse_mode] Format Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message.
[entities] Array.<MessageEntity> List of special entities that appear in message text, which can be specified instead of parse_mode.
[link_preview_options] LinkPreviewOptions Options for how links in the message should be previewed.
[disable_notification] boolean Sends the message silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the sent message from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove the reply keyboard or to force a reply from the user.

ReplyWithFormattedTextOptions : Object

Options for replying with a message formatted in HTML or Markdown.

Kind: global typedef
Properties

Name Type Description
text string Text of the message to be sent, formatted in HTML or Markdown.
[disable_notification] boolean Sends the message silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the sent message from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard, or to force a reply from the user.

ReplyWithChatActionOptions : Object

Options for replying with chat action.

Kind: global typedef
Properties

Name Type Description
action string Type of action to broadcast. Choose one, depending on what the user is about to receive.
[disable_notification] boolean Sends the chat action silently. Users will see the action with no sound.
[protect_content] boolean Protects the content of the sent action from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.

ReplyWithEditedMessageOptions : Object

Options for editing and replying with a message.

Kind: global typedef
Properties

Name Type Description
text string Text of the message to be edited and sent.
[parse_mode] Format Format of the text: Markdown or HTML.
[entities] Array.<MessageEntity> List of special entities that appear in message text, which can be specified instead of parse_mode.
[link_preview_options] LinkPreviewOptions Options for how links in the message should be previewed.
[reply_markup] InlineKeyboardMarkup Additional interface options. A JSON-serialized object for an inline keyboard.

ReplyWithPhotoOptions : Object

Options for replying with a photo.

Kind: global typedef
Properties

Name Type Description
photo InputFile | string Unique file identifier of the photo to send or the photo itself.
[caption] string Caption for the photo, 0-1024 characters after entities parsing.
[parse_mode] Format Format of the caption text: Markdown or HTML.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption, which can be specified instead of parse_mode.
[has_spoiler] boolean Marks the caption as containing a spoiler.
[disable_notification] boolean Sends the message silently. Users will receive a notification with no sound.
[protect_content] boolean Protects the content of the sent message from forwarding and saving.
[reply_parameters] ReplyParameters Additional parameters for replying to messages.
[reply_markup] InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove the reply keyboard, or to force a reply from the user.

WebhookInfo : Object

the current status of a webhook.

Kind: global typedef
Properties

Name Type Description
url string Webhook URL.
has_custom_certificate boolean True, if a custom certificate was provided for webhook certificate checks.
pending_update_count number Number of updates awaiting delivery.
[ip_address] string Currently used webhook IP address.
[last_error_date] number Unix time for the most recent error.
[last_error_message] string Error message in human-readable format for the most recent error.
[last_synchronization_error_date] number Unix time of the most recent error happened when trying to synchronize available updates.
[max_connections] number The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery
[allowed_updates] Array.<string> A list of update types the bot is subscribed to

MessageId : Object

represents a unique message identifier.

Kind: global typedef
Properties

Name Type Description
message_id number Unique message identifier

InaccessibleMessage : Object

message that was deleted or is otherwise inaccessible to the bot.

Kind: global typedef
Properties

Name Type Description
chat Chat Chat the message belonged to
message_id number Unique message identifier inside the chat
date number Always 0. The field can be used to differentiate regular and inaccessible messages.

MaybeInaccessibleMessage : Message | InaccessibleMessage

message that can be inaccessible to the bot.

Kind: global typedef

ReplyParameters : Object

Kind: global typedef
Properties

Name Type Description
message_id number Identifier of the message.
[chat_id] number | string unique identifier for the chat or username of the channel.
[allow_sending_without_reply] boolean Pass True if the message should be sent even if the message to be replied to is not found.
[quote] string Quoted part of the message to be replied to
[quote_parse_mode] string Mode for parsing entities in the quote.
[quote_entities] Array.<MessageEntity> list of special entities that appear in the quote.
[quote_position] number Position of the quote in the original message in UTF-16 code units.

the origin of a message.

Kind: global typedef

MessageOriginUser : Object

originally sent by a known user.

Kind: global typedef
Properties

Name Type Description
type string Type of the message origin, always user.
date number Date the message was sent originally in Unix time.
sender_user User User that sent the message originally.

MessageOriginHiddenUser : Object

originally sent by an unknown user.

Kind: global typedef
Properties

Name Type Description
type string Type of the message origin, always hidden_user.
date number Date the message was sent originally in Unix time.
sender_user_name string Name of the user that sent the message originally.

MessageOriginChat : Object

originally sent on behalf of a chat to a group chat.

Kind: global typedef
Properties

Name Type Description
type string Type of the message origin, always chat.
date number Date the message was sent originally in Unix time.
sender_chat Chat Chat that sent the message originally.
[author_signature] string messages originally sent by an anonymous chat administrator.

MessageOriginChannel : Object

originally sent to a channel chat.

Kind: global typedef
Properties

Name Type Description
type string Type of the message origin, always channel.
date number Date the message was sent originally in Unix time.
chat Chat Channel chat to which the message was originally sent.
message_id number Unique message identifier inside the chat.
[author_signature] string Signature of the original post author.

ChatBoostUpdated : Object

a boost added to a chat or changed.

Kind: global typedef
Properties

Name Type Description
chat Chat Chat which was boosted.
boost ChatBoost Information about the chat boost.

ChatBoostRemoved : Object

a boost removed from a chat.

Kind: global typedef
Properties

Name Type Description
chat Chat Chat which was boosted
boost_id string Unique identifier of the boost
remove_date number Point in time - Unix timestamp, when the boost was removed
source ChatBoostSource Source of the removed boost

PollAnswer : Object

answer of a user in a non-anonymous poll.

Kind: global typedef
Properties

Name Type Description
poll_id string Unique poll identifier.
[voter_chat] Chat The chat that changed the answer to the poll, if the voter is anonymous.
[user] User The user that changed the answer to the poll, if the voter isn't anonymous.
option_ids Array.<number> 0-based identifiers of chosen answer options. May be empty if the vote was retracted.

ChatMemberUpdated : Object

changes in the status of a chat member.

Kind: global typedef
Properties

Name Type Description
chat Chat Chat the user belongs to.
from User Performer of the action, which resulted in the change.
date number Date the change was done in Unix time.
old_chat_member ChatMember Previous information about the chat member.
new_chat_member ChatMember New information about the chat member.
[invite_link] ChatInviteLink Chat invite link, which was used by the user to join the chat.
[via_chat_folder_invite_link] boolean True, if the user joined the chat via a chat folder invite link.

ChatJoinRequest : Object

join request sent to a chat.

Kind: global typedef
Properties

Name Type Description
chat Chat Chat to which the request was sent.
from User User that sent the join request.
user_chat_id number Identifier of a private chat with the user who sent the join request.
date number Date the request was sent in Unix time.
[bio] string Bio of the user.
[invite_link] ChatInviteLink Chat invite link that was used by the user to send the join request.

CallbackQuery : Object

an incoming callback query from a callback button in an inline keyboard.

Kind: global typedef
Properties

Name Type Description
id string Unique identifier for this query
from User Sender
[message] MaybeInaccessibleMessage Message sent by the bot with the callback button that originated the query
[inline_message_id] string Identifier of the message sent via the bot in inline mode, that originated the query.
chat_instance string Global identifier, uniquely corresponding to the chat.
[data] string Data associated with the callback button.
[game_short_name] string Short name of a Game to be returned, serves as the unique identifier for the game.

ShippingQuery : Object

contains information about an incoming shipping query.

Kind: global typedef
Properties

Name Type Description
id string Unique query identifier.
from User User who sent the query.
invoice_payload string Bot specified invoice payload.
shipping_address ShippingAddress User specified shipping address.

PreCheckoutQuery : Object

contains information about an incoming pre-checkout query.

Kind: global typedef
Properties

Name Type Description
id string Unique query identifier.
from User User who sent the query.
currency string Three-letter ISO 4217 currency code.
total_amount number Total price in the smallest units of the currency. integer, not float/double.
invoice_payload string Bot specified invoice payload.
[shipping_option_id] string Identifier of the shipping option chosen by the user.
[order_info] OrderInfo Order information provided by the user.

MessageReactionUpdated : Object

a change of a reaction on a message performed by a user.

Kind: global typedef
Properties

Name Type Description
chat Chat The chat containing the message the user reacted to.
message_id number Unique identifier of the message inside the chat.
[user] User The user that changed the reaction, if the user isn't anonymous.
[actor_chat] Chat The chat on behalf of which the reaction was changed, if the user is anonymous.
date number Date of the change in Unix time.
old_reaction Array.<ReactionType> Previous list of reaction types that were set by the user.
new_reaction Array.<ReactionType> New list of reaction types that have been set by the user.

MessageReactionCountUpdated : Object

reaction changes on a message with anonymous reactions.

Kind: global typedef
Properties

Name Type Description
chat Chat The chat containing the message.
message_id number Unique message identifier inside the chat.
date number Date of the change in Unix time.
reactions Array.<ReactionCount> List of reactions that are present on the message.

InlineQuery : Object

an incoming inline query.

Kind: global typedef
Properties

Name Type Description
id string Unique identifier for this query.
from User Sender.
query string Text of the query. up to 256 characters.
offset string Offset of the results to be returned, can be controlled by the bot.
[chat_type] string Type of the chat from which the inline query was sent.
[location] Location Sender location, only for bots that request user location.

ChosenInlineResult : Object

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

Kind: global typedef
Properties

Name Type Description
result_id string The unique identifier for the result that was chosen.
from User The user that chose the result.
[location] Location Sender location, only for bots that require user location.
[inline_message_id] string Identifier of the sent inline message.
query string The query that was used to obtain the result.

Message : Object

a message

Kind: global typedef
Properties

Name Type Description
message_id number Unique message identifier inside this chat.
[message_thread_id] number Unique identifier of a message thread to which the message belongs; for supergroups only.
[from] User Sender of the message; empty for messages sent to channels. For backward compatibility.
[sender_chat] Chat Sender of the message, sent on behalf of a chat.
[sender_boost_count] number If the sender of the message boosted the chat.
date number Date the message was sent in Unix time.
chat Chat Chat the message belongs to.
[forward_origin] MessageOrigin Information about the original message for forwarded messages.
[is_topic_message] boolean True, if the message is sent to a forum topic.
[is_automatic_forward] boolean True, if the message was automatically forwarded to the connected discussion group.
[reply_to_message] Message For replies in the same chat and message thread, the original message.
[external_reply] ExternalReplyInfo Information about the message that is being replied to.
[quote] TextQuote For replies that quote part of the original message.
[reply_to_story] Story For replies to a story, the original story.
[via_bot] User Bot through which the message was sent.
[edit_date] number Date the message was last edited in Unix time.
[has_protected_content] boolean True, if the message can't be forwarded.
[media_group_id] string The unique identifier of a media message group this message belongs to.
[author_signature] string Signature of the post author for messages in channels.
[text] string For text messages, the actual UTF-8 text of the message.
[entities] Array.<MessageEntity> For text messages, special entities like usernames, URLs, bot commands, etc.
[link_preview_options] LinkPreviewOptions Options used for link preview generation for the message.
[animation] Animation Message is an animation, information about the animation.
[audio] Audio Message is an audio file, information about the file.
[document] Document Message is a general file, information about the file.
[photo] Array.<PhotoSize> Message is a photo, available sizes of the photo.
[sticker] Sticker Message is a sticker, information about the sticker.
[story] Story Message is a forwarded story.
[video] Video Message is a video, information about the video.
[video_note] VideoNote Message is a video note, information about the video message.
[voice] Voice Message is a voice message, information about the file.
[caption] string Caption for the animation, audio, document, photo, video or voice.
[caption_entities] Array.<MessageEntity> For messages with a caption, special entities like usernames, URLs, bot commands, etc.
[has_media_spoiler] boolean True, if the message media is covered by a spoiler animation.
[contact] Contact Message is a shared contact, information about the contact.
[dice] Dice Message is a dice with random value.
[game] Game Message is a game, information about the game.
[poll] Poll Message is a native poll, information about the poll.
[venue] Venue Message is a venue, information about the venue.
[location] Location Message is a shared location, information about the location.
[new_chat_members] Array.<User> New members that were added to the group or supergroup and information about them.
[left_chat_member] User A member was removed from the group, information about them
[new_chat_title] string A chat title was changed to this value.
[new_chat_photo] Array.<PhotoSize> A chat photo was change to this value.
[delete_chat_photo] boolean Service message: the chat photo was deleted.
[group_chat_created] boolean Service message: the group has been created.
[supergroup_chat_created] boolean Service message: the supergroup has been created.
[channel_chat_created] boolean Service message: the channel has been created.
[message_auto_delete_timer_changed] MessageAutoDeleteTimerChanged Service message: auto-delete timer settings changed in the chat.
[migrate_to_chat_id] number The group has been migrated to a supergroup with the specified identifier.
[migrate_from_chat_id] number The supergroup has been migrated from a group with the specified identifier.
[pinned_message] MaybeInaccessibleMessage Specified message was pinned.
[invoice] Invoice Message is an invoice for a payment, information about the invoice.
[successful_payment] SuccessfulPayment Message is a service message about a successful payment.
[users_shared] UsersShared Service message: users were shared with the bot.
[chat_shared] ChatShared Service message: a chat was shared with the bot.
[connected_website] string The domain name of the website on which the user has logged in.
[write_access_allowed] WriteAccessAllowed the user allowed the bot to write messages after adding it to the attachment.
[passport_data] PassportData Telegram Passport data
[proximity_alert_triggered] ProximityAlertTriggered A user in the chat triggered user's proximity alert while sharing Live Location.
[boost_added] ChatBoostAdded Service message: user boosted the chat.
[forum_topic_created] ForumTopicCreated Service message: forum topic created.
[forum_topic_edited] ForumTopicEdited Service message: forum topic edited.
[forum_topic_closed] ForumTopicClosed Service message: forum topic closed.
[forum_topic_reopened] ForumTopicReopened Service message: forum topic reopened.
[general_forum_topic_hidden] GeneralForumTopicHidden Service message: the 'General' forum topic hidden.
[general_forum_topic_unhidden] GeneralForumTopicUnhidden Service message: the 'General' forum topic unhidden.
[giveaway_created] GiveawayCreated Service message: a scheduled giveaway was created.
[giveaway] Giveaway The message is a scheduled giveaway message.
[giveaway_winners] GiveawayWinners A giveaway with public winners was completed.
[giveaway_completed] GiveawayCompleted Service message: a giveaway without public winners was completed.
[video_chat_scheduled] VideoChatScheduled Service message: video chat scheduled.
[video_chat_started] VideoChatStarted Service message: video chat started.
[video_chat_ended] VideoChatEnded Service message: video chat ended.
[video_chat_participants_invited] VideoChatParticipantsInvited Service message: new participants invited to a video chat.
[web_app_data] WebAppData Service message: data sent by a Web App.
[reply_markup] InlineKeyboardMarkup Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.

User : Object

Telegram user or bot.

Kind: global typedef
Properties

Name Type Description
id number Unique identifier for this user or bot.
is_bot boolean True if the user is a bot.
first_name string User's or bot's first name.
[last_name] string User's or bot's last name.
[username] string User's or bot's username.
[language_code] string IETF language tag of the user's language.
[is_premium] boolean True if the user has Telegram Premium.
[added_to_attachment_menu] boolean True if the bot is added to the attachment menu.
[can_join_groups] boolean True if the bot can be invited to groups.
[can_read_all_group_messages] boolean True if privacy mode is disabled for the bot.
[supports_inline_queries] boolean True if the bot supports inline queries.

Chat : Object

a chat.

Kind: global typedef
Properties

Name Type Description
id number Unique identifier for this chat.
type string Type of chat, can be either private, group, supergroup or channel.
title string Title, for supergroups, channels and group chats.
[username] string Username, for private chats, supergroups and channels if available.
[first_name] string First name of the other party in a private chat.
[last_name] string Last name of the other party in a private chat.
[is_forum] boolean True, if the supergroup chat is a forum.
[photo] ChatPhoto Chat photo. Returned only in getChat.
[active_usernames] Array.<string> f non-empty, the list of all active chat usernames.
[available_reactions] Array.<ReactionType> List of available reactions allowed in the chat.
[accent_color_id] number Identifier of the accent color for the chat name and backgrounds of the chat photo.
[background_custom_emoji_id] string Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background.
[profile_accent_color_id] number Identifier of the accent color for the chat's profile background.
[profile_background_custom_emoji_id] string ustom emoji identifier of the emoji chosen by the chat for its profile background.
[emoji_status_custom_emoji_id] string Custom emoji identifier of the emoji status of the chat or the other party in a private chat.
[emoji_status_expiration_date] number Expiration date of the emoji status of the chat or the other party in a private chat.
[bio] string Bio of the other party in a private chat. Returned only in getChat.
[has_private_forwards] boolean True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user.
[has_restricted_voice_and_video_messages] boolean True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat.
[join_to_send_messages] boolean True, if users need to join the supergroup before they can send messages.
[join_by_request] boolean True, if all users directly joining the supergroup need to be approved by supergroup administrators.
[description] string Description, for groups, supergroups and channel chats. Returned only in getChat.
[invite_link] string Primary invite link, for groups, supergroups and channel chats.
[pinned_message] Message The most recent pinned message.
[permissions] ChatPermissions Default chat member permissions, for groups and supergroups.
[slow_mode_delay] number For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user.
[unrestrict_boost_count] number For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions.
[message_auto_delete_time] number The time after which all messages sent to the chat will be automatically deleted.
[has_aggressive_anti_spam_enabled] boolean True, if aggressive anti-spam checks are enabled in the supergroup.
[has_hidden_members] boolean True, if non-administrators can only get the list of bots and administrators in the chat.
[has_protected_content] boolean True, if messages from the chat can't be forwarded to other chats.
[has_visible_history] boolean True, if new chat members will have access to old messages.
[sticker_set_name] string For supergroups, name of group sticker set. Returned only in getChat.
[can_set_sticker_set] boolean True, if the bot can change the group sticker set. Returned only in getChat.
[custom_emoji_sticker_set_name] string For supergroups, the name of the group's custom emoji sticker set.
[linked_chat_id] number Unique identifier for the linked chat, i.e.
[location] ChatLocation For supergroups, the location to which the supergroup is connected. Returned only in getChat.

MessageOrigin : Object

the origin of a message. It can be one of.

Kind: global typedef
Properties

Name Type Description
type string Type of the message origin, always user.
date number Date the message was sent originally in Unix time.
sender_user User User that sent the message originally.
sender_user_name string Name of the user that sent the message originally.
sender_chat Chat Chat that sent the message originally.
[author_signature] string Signature of the original post author.
chat Chat Channel chat to which the message was originally sent.
message_id number Unique message identifier inside the chat.

ExternalReplyInfo : Object

contains information about a message that is being replied to, which may come from another chat or forum topic.

Kind: global typedef
Properties

Name Type Description
origin MessageOrigin Origin of the message replied to by the given message
[chat] Chat Chat the original message belongs to.
[message_id] number Unique message identifier inside the original chat.
[link_preview_options] LinkPreviewOptions Options used for link preview generation for the original message, if it is a text message.
[animation] Animation Message is an animation, information about the animation.
[audio] Audio Message is an audio file, information about the file.
[document] Document Message is a general file, information about the file.
[photo] Array.<PhotoSize> Message is a photo, available sizes of the photo.
[sticker] Sticker Message is a sticker, information about the sticker.
[story] Story Message is a forwarded story.
[video] Video Message is a video, information about the video.
[video_note] VideoNote Message is a video note, information about the video message.
[voice] Voice Message is a voice message, information about the file.
[has_media_spoiler] boolean True, if the message media is covered by a spoiler animation.
[contact] Contact Message is a shared contact, information about the contact.
[dice] Dice Message is a dice with random value.
[game] Game Message is a game, information about the game.
[giveaway] Giveaway Message is a scheduled giveaway, information about the giveaway.
[giveaway_winners] GiveawayWinners A giveaway with public winners was completed.
[invoice] Invoice Message is an invoice for a payment, information about the invoice.
[location] Location Message is a shared location, information about the location.
[poll] Poll Message is a native poll, information about the poll.
[venue] Venue Message is a venue, information about the venue.

TextQuote : Object

contains information about the quoted part of a message that is replied to by the given message.

Kind: global typedef
Properties

Name Type Description
text string Text of the quoted part of a message that is replied to by the given message.
[entities] Array.<MessageEntity> Special entities that appear in the quote.
position number Approximate quote position in the original message in UTF-16 code units as specified by the sender.
[is_manual] boolean True, if the quote was chosen manually by the message sender.

MessageEntity : Object

one special entity in a text message.

Kind: global typedef
Properties

Name Type Description
type string Type of the entity.
offset number Offset in UTF-16 code units to the start of the entity.
length number Length of the entity in UTF-16 code units.
[url] string For text_link only, URL that will be opened after user taps on the text.
[user] User For text_mention only, the mentioned user.
[language] string For pre only, the programming language of the entity text.
[custom_emoji_id] string For custom_emoji only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the .

LinkPreviewOptions : Object

the options used for link preview generation.

Kind: global typedef
Properties

Name Type Description
[is_disabled] boolean True, if the link preview is disabled.
[url] string URL to use for the link preview.
[prefer_small_media] boolean True, if the media in the link preview is supposed to be shrunk.
[prefer_large_media] boolean rue, if the media in the link preview is supposed to be enlarged.
[show_above_text] boolean True, if the link preview must be shown above the message text.

Animation : Object

an animation file, GIF or H.264/MPEG-4 AVC video without sound.

Kind: global typedef
Properties

Name Type Description
file_id string Identifier for this file, which can be used to download or reuse the file.
file_unique_id string Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
width number Video width as defined by sender.
height number Video height as defined by sender.
duration number Duration of the video in seconds as defined by sender.
[thumbnail] PhotoSize Animation thumbnail as defined by sender.
[file_name] string Original animation filename as defined by sender.
[mime_type] string MIME type of the file as defined by sender.
[file_size] number File size in bytes.

Audio : Object

an audio file to be treated as music by the Telegram clients.

Kind: global typedef
Properties

Name Type Description
file_id string Identifier for this file, which can be used to download or reuse the file.
file_unique_id string Unique identifier for this file, which is supposed to be the same over time and for different bots.
duration number Duration of the audio in seconds as defined by sender.
[performer] string Performer of the audio as defined by sender or by audio tags.
[title] string Title of the audio as defined by sender or by audio tags.
[file_name] string Original filename as defined by sender.
[mime_type] string MIME type of the file as defined by sender.
[file_size] number File size in bytes.
[thumbnail] PhotoSize Thumbnail of the album cover to which the music file belongs

Document : Object

a general file, as opposed to photos, voice messages and audio files.

Kind: global typedef
Properties

Name Type Description
file_id string Identifier for this file, which can be used to download or reuse the file.
file_unique_id string Unique identifier for this file, which is supposed to be the same over time and for different bots.
[thumbnail] PhotoSize Document thumbnail as defined by sender.
[file_name] string Original filename as defined by sender.
[mime_type] string MIME type of the file as defined by sender.
[file_size] number File size in bytes.

PhotoSize : Object

one size of a photo or a file / sticker thumbnail.

Kind: global typedef
Properties

Name Type Description
file_id string Identifier for this file, which can be used to download or reuse the file.
file_unique_id string Unique identifier for this file, which is supposed to be the same over time and for different bots.
width number Photo width.
height number Photo height.
[file_size] number File size in bytes.

Sticker : Object

a sticker.

Kind: global typedef
Properties

Name Type Description
file_id string Identifier for this file, which can be used to download or reuse the file.
file_unique_id string Unique identifier for this file, which is supposed to be the same over time and for different bots.
type string Type of the sticker, currently one of regular, mask, custom_emoji.
width number Sticker width.
height number Sticker height.
is_animated boolean True, if the sticker is animated.
is_video boolean True, if the sticker is a video sticker.
[thumbnail] PhotoSize Sticker thumbnail in the .WEBP or .JPG format.
[emoji] string Emoji associated with the sticker.
[set_name] string Name of the sticker set to which the sticker belongs.
[premium_animation] File For premium regular stickers, premium animation for the sticker.
[mask_position] MaskPosition For mask stickers, the position where the mask should be placed.
[custom_emoji_id] string For custom emoji stickers, unique identifier of the custom emoji.
[needs_repainting] boolean True, if the sticker must be repainted to a text color in messages.
[file_size] number File size in bytes.

Video : Object

a video file.

Kind: global typedef
Properties

Name Type Description
file_id string Identifier for this file, which can be used to download or reuse the file.
file_unique_id string Unique identifier for this file, which is supposed to be the same over time and for different bots.
width number Video width as defined by sender.
height number Video height as defined by sender.
duration number Duration of the video in seconds as defined by sender.
[thumbnail] PhotoSize Video thumbnail.
[file_name] string Original filename as defined by sender.
[mime_type] string MIME type of the file as defined by sender.
[file_size] number File size in bytes.

VideoNote : Object

a video message, available in Telegram apps as of v.4.0.

Kind: global typedef
Properties

Name Type Description
file_id string Identifier for this file, which can be used to download or reuse the file.
file_unique_id string Unique identifier for this file, which is supposed to be the same over time and for different bots.
length number Video width and height, diameter of the video message as defined by sender.
duration number Duration of the video in seconds as defined by sender.
[thumbnail] PhotoSize Video thumbnail.
[file_size] number File size in bytes.

Voice : Object

a voice note.

Kind: global typedef
Properties

Name Type Description
file_id string Identifier for this file, which can be used to download or reuse the file.
file_unique_id string Unique identifier for this file, which is supposed to be the same over time and for different bots.
duration number Duration of the audio in seconds as defined by sender.
[mime_type] string MIME type of the file as defined by sender.
[file_size] number File size in bytes.

Contact : Object

a phone contact.

Kind: global typedef
Properties

Name Type Description
phone_number string Contact's phone number
first_name string Contact's first name
[last_name] string Contact's last name
[user_id] number Contact's user identifier in Telegram.
[vcard] string Additional data about the contact in the form of a vCard

Dice : Object

an animated emoji that displays a random value.

Kind: global typedef
Properties

Name Type Description
emoji string Emoji on which the dice throw animation is based
value number Value of the dice, 1-6 for 🎲, 🎯 and 🎳 base emoji, 1-5 for 🏀 and ⚽ base emoji, 1-64 for 🎰 base emoji

Game : Object

a game.

Kind: global typedef
Properties

Name Type Description
title string Title of the game.
description string Description of the game.
photo Array.<PhotoSize> Photo that will be displayed in the game message in chats.
[text] string Brief description of the game or high scores included in the game message.
[text_entities] Array.<MessageEntity> Special entities that appear in text, such as usernames, URLs, bot commands, etc.
[animation] Animation Animation that will be displayed in the game message in chats. Upload via BotFather.

Poll : Object

contains information about a poll.

Kind: global typedef
Properties

Name Type Description
id string Unique poll identifier.
question string Poll question, 1-300 characters.
options Array.<PollOption> List of poll options.
total_voter_count number Total number of users that voted in the poll.
is_closed boolean True, if the poll is closed.
is_anonymous boolean True, if the poll is anonymous.
type string Poll type, currently can be regular or quiz.
allows_multiple_answers boolean rue, if the poll allows multiple answers.
[correct_option_id] number 0-based identifier of the correct answer option.
[explanation] string Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll.
[explanation_entities] Array.<MessageEntity> Special entities like usernames, URLs, bot commands, etc.
[open_period] number Amount of time in seconds the poll will be active after creation.
[close_date] number Point in time - Unix timestamp, when the poll will be automatically closed.

Venue : Object

a venue.

Kind: global typedef
Properties

Name Type Description
location Location Venue location.
title string Name of the venue
address string Address of the venue
[foursquare_id] string Foursquare identifier of the venue
[foursquare_type] string Foursquare type of the venue. ex. arts_entertainment/default, arts_entertainment/aquarium or food/icecream`.
[google_place_id] string Google Places identifier of the venue.
[google_place_type] string Google Places type of the venue.

Location : Object

a point on the map.

Kind: global typedef
Properties

Name Type Description
longitude number Longitude as defined by sender.
latitude number Latitude as defined by sender.
[horizontal_accuracy] number The radius of uncertainty for the location, measured in meters; 0-1500.
[live_period] number Time relative to the message sending date, during which the location can be updated.
[heading] number The direction in which user is moving, in degrees; 1-360. For active live locations only.
[proximity_alert_radius] number The maximum distance for proximity alerts about approaching another chat member, in meters.

MessageAutoDeleteTimerChanged : Object

a service message about a change in auto-delete timer settings.

Kind: global typedef
Properties

Name Type Description
message_auto_delete_time number New auto-delete time for messages in the chat; in seconds.

Invoice : Object

contains basic information about an invoice.

Kind: global typedef
Properties

Name Type Description
title string Product name
description string Product description
start_parameter string Unique bot deep-linking parameter that can be used to generate this invoice
currency string Three-letter ISO 4217 currency code
total_amount number Total price in the smallest units of the currency, integer, not float/double.

SuccessfulPayment : Object

contains basic information about a successful payment.

Kind: global typedef
Properties

Name Type Description
currency string Three-letter ISO 4217 currency code.
total_amount number Total price in the smallest units of the currency, integer, not float/double.
invoice_payload string Bot specified invoice payload.
shipping_option_id string Identifier of the shipping option chosen by the user.
order_info OrderInfo Order information provided by the user.
telegram_payment_charge_id string Telegram payment identifier.
provider_payment_charge_id string Provider payment identifier.

UsersShared : Object

contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button.

Kind: global typedef
Properties

Name Type Description
request_id number Identifier of the request.
user_ids Array.<number> Identifiers of the shared users.

ChatShared : Object

contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button.

Kind: global typedef
Properties

Name Type Description
request_id number Identifier of the request.
chat_id number Identifier of the shared chat.

WriteAccessAllowed : Object

This object represents a service message about a user allowing a bot to write messages

Kind: global typedef
Properties

Name Type Description
from_request boolean True, if the access was granted after the user accepted an explicit request from a Web App.
web_app_name string Name of the Web App, if the access was granted when the Web App was launched from a link.
from_attachment_menu boolean True, if the access was granted when the bot was added to the attachment or side menu.

PassportData : Object

Describes Telegram Passport data shared with the bot by the user.

Kind: global typedef
Properties

Name Type Description
data Array.<EncryptedPassportElement> Array with information about documents and other Telegram Passport elements that was shared with the bot.
credentials EncryptedCredentials Encrypted credentials required to decrypt the data.

ProximityAlertTriggered : Object

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

Kind: global typedef
Properties

Name Type Description
traveler User User that triggered the alert.
watcher User User that set the alert.
distance number The distance between the users.

ForumTopicCreated : Object

a service message about a new forum topic created in the chat.

Kind: global typedef
Properties

Name Type Description
name string Name of the topic.
icon_color number Color of the topic icon in RGB format.
icon_custom_emoji_id string Unique identifier of the custom emoji shown as the topic icon.

ForumTopicEdited : Object

a service message about an edited forum topic.

Kind: global typedef
Properties

Name Type Description
name string New name of the topic, if it was edited
icon_custom_emoji_id string New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed.

Giveaway : Object

a message about a scheduled giveaway.

Kind: global typedef
Properties

Name Type Description
chats Array.<Chat> The list of chats which the user must join to participate in the giveaway
winners_selection_date number Point in time - Unix timestamp, when winners of the giveaway will be selected
winner_count number The number of users which are supposed to be selected as winners of the giveaway
[only_new_members] boolean True, if only users who join the chats after the giveaway started should be eligible to win
[has_public_winners] boolean True, if the list of giveaway winners will be visible to everyone
[prize_description] string Description of additional giveaway prize
[country_codes] Array.<string> A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come.
[premium_subscription_month_count] number The number of months the Telegram Premium subscription won from the giveaway will be active for

GiveawayWinners : Object

a message about the completion of a giveaway with public winners.

Kind: global typedef
Properties

Name Type Description
chat Chat The chat that created the giveaway
giveaway_message_id number Identifier of the message with the giveaway in the chat
winners_selection_date number Point in time - Unix timestamp when winners of the giveaway were selected
winner_count number Total number of winners in the giveaway
winners Array.<User> List of up to 100 winners of the giveaway
[additional_chat_count] number The number of other chats the user had to join in order to be eligible for the giveaway
[premium_subscription_month_count] number The number of months the Telegram Premium subscription won from the giveaway will be active for
[unclaimed_prize_count] number Number of undistributed prizes
[only_new_members] boolean True, if only users who had joined the chats after the giveaway started were eligible to win
[was_refunded] boolean True, if the giveaway was canceled because the payment for it was refunded
[prize_description] string Description of additional giveaway prize

GiveawayCompleted : Object

a service message about the completion of a giveaway without public winners.

Kind: global typedef
Properties

Name Type Description
winner_count number Number of winners in the giveaway.
[unclaimed_prize_count] number Number of undistributed prizes.
[giveaway_message] Message Message with the giveaway that was completed, if it wasn't deleted.

VideoChatScheduled : Object

a service message about a video chat scheduled in the chat.

Kind: global typedef
Properties

Name Type Description
start_date number Point in time - Unix timestamp, when the video chat is supposed to be started by a chat administrator

VideoChatEnded : Object

a service message about a video chat ended in the chat.

Kind: global typedef
Properties

Name Type Description
duration number Video chat duration in seconds.

VideoChatParticipantsInvited : Object

a service message about new members invited to a video chat.

Kind: global typedef
Properties

Name Type Description
users Array.<User> New members that were invited to the video chat.

WebAppData : Object

data sent from a Web App to the bot.

Kind: global typedef
Properties

Name Type Description
data string The data. Be aware that a bad client can send arbitrary data in this field.
button_text string Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.

InlineKeyboardMarkup : Object

an inline keyboard that appears right next to the message it belongs to.

Kind: global typedef
Properties

Name Type Description
inline_keyboard Array.<Array.<InlineKeyboardButton>> Array of button rows, each represented by an Array of InlineKeyboardButton objects

InlineKeyboardButton : Object

one button of an inline keyboard. You must use exactly one of the optional fields.

Kind: global typedef
Properties

Name Type Description
text string Label text on the button.
[url] string HTTP or tg:// URL to be opened when the button is pressed.
[callback_data] string Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
[web_app] WebAppInfo Description of the Web App that will be launched when the user presses the button.
[login_url] LoginUrl An HTTPS URL used to automatically authorize the user.
[switch_inline_query] string If set, pressing the button will prompt the user to select one of their chats.
[switch_inline_query_current_chat] string If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field.
[switch_inline_query_chosen_chat] SwitchInlineQueryChosenChat If set, pressing the button will prompt the user to select one of their chats of the specified type
[callback_game] CallbackGame Description of the game that will be launched when the user presses the button.
[pay] boolean Specify True, to send a Pay button.

ReplyKeyboardRemove : Object

Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard.

Kind: global typedef
Properties

Name Type Description
remove_keyboard true Requests clients to remove the custom keyboard.
[selective] boolean Use this parameter if you want to remove the keyboard for specific users only.

KeyboardButton : Object

one button of the reply keyboard.

Kind: global typedef
Properties

Name Type Description
text string Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed.
[request_users] KeyboardButtonRequestUsers If specified, pressing the button will open a list of suitable users.
[request_chat] KeyboardButtonRequestChat If specified, pressing the button will open a list of suitable chats.
[request_contact] boolean If True, the user's phone number will be sent as a contact when the button is pressed.
[request_location] boolean If True, the user's current location will be sent when the button is pressed.
[request_poll] KeyboardButtonPollType If specified, user will be asked to create poll and send to the bot when the button is pressed.
[web_app] WebAppInfo If specified, the described Web App will be launched when the button is pressed.

ReplyKeyboardMarkup : Object

a custom keyboard with reply options.

Kind: global typedef
Properties

Name Type Description
keyboard Array.<Array.<KeyboardButton>> Array of button rows, each represented by an Array of KeyboardButton objects.
[is_persistent] boolean Requests clients to always show the keyboard when the regular keyboard is hidden.
[resize_keyboard] boolean Requests clients to resize the keyboard vertically for optimal fit.
[one_time_keyboard] boolean Requests clients to hide the keyboard as soon as it's been used.
[input_field_placeholder] string The placeholder to be shown in the input field when the keyboard is active.
[selective] boolean Use this parameter if you want to show the keyboard to specific users only.

PollOption : Object

information about one answer option in a poll.

Kind: global typedef
Properties

Name Type Description
text string Option text, 1-100 characters.
voter_count number Number of users that voted for this option.

UserProfilePhotos : Object

a user's profile pictures.

Kind: global typedef
Properties

Name Type Description
total_count number Total number of profile pictures the target user has.
photos Array.<Array.<PhotoSize>> Requested profile pictures, in up to 4 sizes each.

File : Object

a file ready to be downloaded.

Kind: global typedef
Properties

Name Type Description
file_id string Identifier for this file, which can be used to download or reuse the file.
file_unique_id string Identifier for this file, which can be used to download or reuse the file.
file_size number File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it.
file_path string File path. Use https://api.telegram.org/file/bot/<file_path> to get the file.

WebAppInfo : Object

a Web App.

Kind: global typedef
Properties

Name Type Description
url string An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps.

KeyboardButtonRequestUsers : Object

the criteria used to request suitable users.

Kind: global typedef
Properties

Name Type Description
request_id number Signed 32-bit identifier of the request that will be received back in the UsersShared object.
[user_is_bot] boolean Pass True to request bots, pass False to request regular users.
[user_is_premium] boolean Pass True to request premium users, pass False to request non-premium users.
[max_quantity] number The maximum number of users to be selected; 1-10. Defaults to 1.

KeyboardButtonRequestChat : Object

the criteria used to request a suitable chat.

Kind: global typedef
Properties

Name Type Description
request_id number Signed 32-bit identifier of the request, which will be received back in the ChatShared object.
chat_is_channel boolean Pass True to request a channel chat, pass False to request a group or a supergroup chat.
[chat_is_forum] boolean Pass True to request a forum supergroup, pass False to request a non-forum chat.
[chat_has_username] boolean Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username.
[chat_is_created] boolean Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.
[user_administrator_rights] ChatAdministratorRights listing the required administrator rights of the user in the chat.
[bot_administrator_rights] ChatAdministratorRights object listing the required administrator rights of the bot in the chat.
[bot_is_member] boolean Pass True to request a chat with the bot as a member.

KeyboardButtonPollType : Object

type of a poll, which is allowed to be created and sent when the corresponding button is pressed.

Kind: global typedef
Properties

Name Type Description
type string If quiz is passed, the user will be allowed to create only polls in the quiz mode.

LoginUrl : Object

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

Kind: global typedef
Properties

Name Type Description
url string An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed.
forward_text string New text of the button in forwarded messages.
bot_username string Username of a bot, which will be used for user authorization.
request_write_access boolean Pass True to request the permission for your bot to send messages to the user.

SwitchInlineQueryChosenChat : Object

an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query.

Kind: global typedef
Properties

Name Type Description
query string The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted.
allow_user_chats boolean True, if private chats with users can be chosen.
allow_bot_chats boolean True, if private chats with bots can be chosen.
allow_group_chats boolean True, if group and supergroup chats can be chosen.
allow_channel_chats boolean True, if channel chats can be chosen.

ForceReply : Object

a message with this object, Telegram clients will display a reply interface to the user.

Kind: global typedef
Properties

Name Type Description
force_reply boolean Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'.
input_field_placeholder string The placeholder to be shown in the input field when the reply is active; 1-64 characters.
selective boolean Use this parameter if you want to force reply from specific users only.

ChatPhoto : Object

a chat photo.

Kind: global typedef
Properties

Name Type Description
small_file_id string File identifier of small - 160x160 chat photo.
small_file_unique_id string Unique file identifier of small - 160x160 chat photo, which is supposed to be the same over time and for different bots.
big_file_id string File identifier of big - 640x640 chat photo.
big_file_unique_id string Unique file identifier of big - 640x640 chat photo, which is supposed to be the same over time and for different bots.

ChatInviteLink : Object

an invite link for a chat.

Kind: global typedef
Properties

Name Type Description
invite_link string The invite link.
creator User Creator of the link.
creates_join_request boolean True, if users joining the chat via the link need to be approved by chat administrators.
is_primary boolean True, if the link is primary.
is_revoked boolean True, if the link is revoked.
name string Invite link name.
expire_date number Point in time - Unix timestamp when the link will expire or has been expired.
member_limit number The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link
pending_join_request_count number Number of pending join requests created using this link

ChatAdministratorRights : Object

the rights of an administrator in a chat.

Kind: global typedef
Properties

Name Type Description
is_anonymous boolean True, if the user's presence in the chat is hidden.
can_manage_chat boolean True, if the administrator can access the chat event log.
can_delete_messages boolean True, if the administrator can delete messages of other users.
can_manage_video_chats boolean True, if the administrator can manage video chats.
can_restrict_members boolean True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics.
can_promote_members boolean True, if the administrator can add new administrators with a subset of their own privileges.
can_change_info boolean True, if the user is allowed to change the chat title, photo and other settings.
can_invite_users boolean True, if the user is allowed to invite new users to the chat.
can_post_stories boolean True, if the administrator can post stories to the chat.
can_edit_stories boolean True, if the administrator can edit stories posted by other users.
can_delete_stories boolean True, if the administrator can delete stories posted by other users.
can_post_messages boolean True, if the administrator can post messages in the channel, or access channel statistics.
can_edit_messages boolean True, if the administrator can edit messages of other users and can pin messages.
can_pin_messages boolean True, if the user is allowed to pin messages; groups and supergroups only.
can_manage_topics boolean True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only.

information about one member of a chat.

Kind: global typedef

ChatMemberOwner : Object

a chat member that owns the chat and has all administrator privileges.

Kind: global typedef
Properties

Name Type Description
status string The member's status in the chat, always creator.
user User Information about the user.
is_anonymous boolean True, if the user's presence in the chat is hidden.
custom_title string Custom title for this user.

ChatMemberAdministrator : Object

a chat member that has some additional privileges.

Kind: global typedef
Properties

Name Type Description
status string The member's status in the chat, always administrator.
user User Information about the user.
can_be_edited boolean True, if the bot is allowed to edit administrator privileges of that user.
is_anonymous boolean True, if the user's presence in the chat is hidden.
can_manage_chat boolean True, if the administrator can access the chat event log, get boost list.
can_delete_messages boolean True, if the administrator can delete messages of other users.
can_manage_video_chats boolean True, if the administrator can manage video chats.
can_restrict_members boolean True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics.
can_promote_members boolean True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted.
can_change_info boolean True, if the user is allowed to change the chat title, photo and other settings.
can_invite_users boolean True, if the user is allowed to invite new users to the chat.
can_post_stories boolean True, if the administrator can post stories to the chat.
can_edit_stories boolean True, if the administrator can edit stories posted by other users.
can_delete_stories boolean True, if the administrator can delete stories posted by other users.
can_post_messages boolean True, if the administrator can post messages in the channel, or access channel statistics; channels only.
can_edit_messages boolean True, if the administrator can edit messages of other users and can pin messages; channels only.
can_pin_messages boolean True, if the user is allowed to pin messages; groups and supergroups only.
can_manage_topics boolean True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only.
custom_title boolean Custom title for this user.

ChatMemberMember : Object

a chat member that has no additional privileges or restrictions.

Kind: global typedef
Properties

Name Type Description
status string The member's status in the chat, always member
user User Information about the user.

ChatMemberRestricted : Object

a chat member that is under certain restrictions in the chat. Supergroups only.

Kind: global typedef
Properties

Name Type Description
status string The member's status in the chat, always restricted.
user User Information about the user.
is_member boolean True, if the user is a member of the chat at the moment of the request.
can_send_messages boolean True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues.
can_send_audios boolean True, if the user is allowed to send audios.
can_send_documents boolean True, if the user is allowed to send documents.
can_send_photos boolean True, if the user is allowed to send photos.
can_send_videos boolean True, if the user is allowed to send videos.
can_send_video_notes boolean True, if the user is allowed to send video notes.
can_send_voice_notes boolean True, if the user is allowed to send voice notes.
can_send_polls boolean True, if the user is allowed to send polls.
can_send_other_messages boolean True, if the user is allowed to send animations, games, stickers and use inline bots.
can_add_web_page_previews boolean True, if the user is allowed to add web page previews to their messages.
can_change_info boolean True, if the user is allowed to change the chat title, photo and other settings.
can_invite_users boolean True, if the user is allowed to invite new users to the chat.
can_pin_messages boolean True, if the user is allowed to pin messages.
can_manage_topics boolean True, if the user is allowed to create forum topics.
until_date number Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever.

ChatMemberLeft : Object

a chat member that isn't currently a member of the chat, but may join it themselves.

Kind: global typedef
Properties

Name Type Description
status string The member's status in the chat, always left
user User Information about the user

ChatMemberBanned : Object

a chat member that was banned in the chat and can't return to the chat or view chat messages.

Kind: global typedef
Properties

Name Type Description
status string The member's status in the chat, always kicked.
user User Information about the user.
until_date number Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever.

ChatPermissions : Object

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

Kind: global typedef
Properties

Name Type Description
can_send_messages boolean True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues.
can_send_audios boolean True, if the user is allowed to send audios.
can_send_documents boolean True, if the user is allowed to send documents.
can_send_photos boolean True, if the user is allowed to send photos.
can_send_videos boolean True, if the user is allowed to send videos.
can_send_video_notes boolean True, if the user is allowed to send video notes.
can_send_voice_notes boolean True, if the user is allowed to send voice notes.
can_send_polls boolean True, if the user is allowed to send polls.
can_send_other_messages boolean True, if the user is allowed to send animations, games, stickers and use inline bots.
can_add_web_page_previews boolean True, if the user is allowed to add web page previews to their messages.
can_change_info boolean True, if the user is allowed to change the chat title, photo and other settings.
can_invite_users boolean True, if the user is allowed to invite new users to the chat.
can_pin_messages boolean True, if the user is allowed to pin messages. Ignored in public supergroups.
can_manage_topics boolean True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages.

ChatLocation : Object

a location to which a chat is connected.

Kind: global typedef
Properties

Name Type Description
location Location The location to which the supergroup is connected. Can't be a live location.
address string Location address; 1-64 characters, as defined by the chat owner

the type of a reaction. Currently, it can be one of

Kind: global typedef

ReactionTypeEmoji : Object

The reaction is based on an emoji.

Kind: global typedef
Properties

Name Type Description
type string Type of the reaction, always emoji
emoji string Reaction emoji.

ReactionTypeCustomEmoji : Object

The reaction is based on a custom emoji.

Kind: global typedef
Properties

Name Type Description
type string Type of the reaction, always custom_emoji
custom_emoji_id string Custom emoji identifier

ReactionCount : Object

a reaction added to a message along with the number of times it was added.

Kind: global typedef
Properties

Name Type Description
type ReactionType Type of the reaction.
total_count number Number of times the reaction was added.

ForumTopic : Object

represents a forum topic.

Kind: global typedef
Properties

Name Type Description
message_thread_id number Unique identifier of the forum topic.
name string Name of the topic.
icon_color number Color of the topic icon in RGB format.
icon_custom_emoji_id string Unique identifier of the custom emoji shown as the topic icon.

BotCommand : Object

represents a bot command.

Kind: global typedef
Properties

Name Type Description
command string Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.
description string Description of the command; 1-256 characters.

represents the scope to which bot commands are applied.

Kind: global typedef

BotCommandScopeDefault : Object

the default scope of bot commands.

Kind: global typedef
Properties

Name Type Description
type string Scope type, must be default.

BotCommandScopeAllPrivateChats : Object

the scope of bot commands, covering all private chats.

Kind: global typedef
Properties

Name Type Description
type string Scope type, must be all_private_chats.

BotCommandScopeAllGroupChats : Object

the scope of bot commands, covering all group and supergroup chats.

Kind: global typedef
Properties

Name Type Description
type string Scope type, must be all_group_chats.

BotCommandScopeAllChatAdministrators : Object

the scope of bot commands, covering all group and supergroup chat administrators.

Kind: global typedef
Properties

Name Type Description
type string Scope type, must be all_chat_administrators.

BotCommandScopeChat : Object

the scope of bot commands, covering a specific chat.

Kind: global typedef
Properties

Name Type Description
type string Scope type, must be chat.
chat_id number | string Unique identifier for the target chat or username of the target supergroup.

BotCommandScopeChatAdministrators : Object

the scope of bot commands, covering all administrators of a specific group or supergroup chat.

Kind: global typedef
Properties

Name Type Description
type string Scope type, must be chat_administrators.
chat_id number | string Unique identifier for the target chat or username of the target supergroup.

BotCommandScopeChatMember : Object

the scope of bot commands, covering a specific member of a group or supergroup chat.

Kind: global typedef
Properties

Name Type Description
type string Scope type, must be chat_member.
chat_id number | string Unique identifier for the target chat or username of the target supergroup.
user_id number Unique identifier of the target user.

BotName : Object

represents the bot's name.

Kind: global typedef
Properties

Name Type Description
name string The bot's name

BotDescription : Object

represents the bot's description.

Kind: global typedef
Properties

Name Type Description
description string The bot's description.

BotShortDescription : Object

the bot's short description.

Kind: global typedef
Properties

Name Type Description
short_description string The bot's short description.

the bot's menu button in a private chat.

Kind: global typedef

MenuButtonCommands : Object

a menu button, which opens the bot's list of commands.

Kind: global typedef
Properties

Name Type Description
type string Type of the button, must be commands.

MenuButtonWebApp : Object

a menu button, which launches a Web App.

Kind: global typedef
Properties

Name Type Description
type string Type of the button, must be web_app.
text string Text on the button.
web_app WebAppInfo Description of the Web App that will be launched when the user presses the button.

MenuButtonDefault : Object

no specific value for the menu button was set.

Kind: global typedef
Properties

Name Type Description
type string Type of the button, must be default.

the source of a chat boost.

Kind: global typedef

ChatBoostSourcePremium : Object

The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.

Kind: global typedef
Properties

Name Type Description
source string Source of the boost, always premium.
user User User that boosted the chat.

ChatBoostSourceGiftCode : Object

he boost was obtained by the creation of Telegram Premium gift codes to boost a chat.

Kind: global typedef
Properties

Name Type Description
source string Source of the boost, always gift_code
user User User for which the gift code was created

ChatBoostSourceGiveaway : Object

The boost was obtained by the creation of a Telegram Premium giveaway.

Kind: global typedef
Properties

Name Type Description
source string Source of the boost, always giveaway
giveaway_message_id number Identifier of a message in the chat with the giveaway; the message could have been deleted already.
user User User that won the prize in the giveaway if any.
is_unclaimed boolean True, if the giveaway was completed, but there was no user to win the prize.

ChatBoost : Object

contains information about a chat boost.

Kind: global typedef
Properties

Name Type Description
boost_id string Unique identifier of the boost.
add_date number Point in time - Unix timestamp when the chat was boosted.
expiration_date number Point in time - Unix timestamp when the boost will automatically expire.
source ChatBoostSource Source of the added boost.

UserChatBoosts : Object

represents a list of boosts added to a chat by a user.

Kind: global typedef
Properties

Name Type Description
boosts Array.<ChatBoost> The list of boosts added to the chat by the user.

ResponseParameters : Object

Describes why a request was unsuccessful.

Kind: global typedef
Properties

Name Type Description
migrate_to_chat_id number The group has been migrated to a supergroup with the specified identifier.
retry_after number In case of exceeding flood control, the number of seconds left to wait before the request can be repeated.

the content of a media message to be sent.

Kind: global typedef

InputMediaPhoto : Object

a photo to be sent.

Kind: global typedef
Properties

Name Type Description
type string Type of the result, Must be photo.
media string File to send.
[caption] string Optional. Caption of the photo.
[parse_mode] string Optional. Mode for parsing entities in the caption.
[caption_entities] Array.<MessageEntity> Optional. Special entities in the caption.
[has_spoiler] boolean Optional. True if photo is a spoiler.

InputMediaVideo : Object

a video to be sent.

Kind: global typedef
Properties

Name Type Description
type string Type of the result, Must be video.
media string File to send.
[thumbnail] InputFile | string Optional. Thumbnail of the file.
[caption] string Optional. Caption of the video.
[parse_mode] string Optional. Mode for parsing entities in the caption.
[caption_entities] Array.<MessageEntity> Optional. Special entities in the caption.
[width] number Optional. Video width.
[height] number Optional. Video height.
[duration] number Optional. Video duration in seconds.
[supports_streaming] boolean Optional. True if video is suitable for streaming.
[has_spoiler] boolean Optional. True if video is a spoiler.

InputMediaAnimation : Object

an animation file GIF or H.264/MPEG-4 AVC video without sound to be sent.

Kind: global typedef
Properties

Name Type Description
type string Type of the result, Must be animation.
media string File to send.
[thumbnail] InputFile | string Optional. Thumbnail of the file.
[caption] string Optional. Caption of the animation.
[parse_mode] string Optional. Mode for parsing entities in the caption.
[caption_entities] Array.<MessageEntity> Optional. Special entities in the caption.
[width] number Optional. Animation width.
[height] number Optional. Animation height.
[duration] number Optional. Animation duration in seconds.
[has_spoiler] boolean Optional. True if animation is a spoiler.

InputMediaAudio : object

an audio file to be treated as music to be sent.

Kind: global typedef
Properties

Name Type Description
type string Type of the result, must be audio
media string File to send.
[thumbnail] InputFile | string Thumbnail of the file sent
[caption] string Caption of the audio to be sent
[parse_mode] string Mode for parsing entities in the audio caption.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption
[duration] number Duration of the audio in seconds
[performer] string Performer of the audio
[title] string Title of the audio

InputMediaDocument : object

a general file to be sent.

Kind: global typedef
Properties

Name Type Description
type string Type of the result, must be document
media string File to send.
[thumbnail] InputFile | string Thumbnail of the file sent.
[caption] string Caption of the document to be sent.
[parse_mode] string Mode for parsing entities in the document caption.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption.
[disable_content_type_detection] boolean Disables automatic server-side content type detection for files uploaded using multipart/form-data.

Sticker : object

represents a sticker.

Kind: global typedef
Properties

Name Type Description
file_id string Identifier for this file, which can be used to download or reuse the file.
file_unique_id string Unique identifier for this file.
type string Type of the sticker, currently one of regular, mask, custom_emoji.
width number Sticker width.
height number Sticker height.
is_animated boolean True, if the sticker is animated.
is_video boolean True, if the sticker is a video sticker.
[thumbnail] PhotoSize Sticker thumbnail in the .WEBP or .JPG format.
[emoji] string Emoji associated with the sticker.
[set_name] string Name of the sticker set to which the sticker belongs.
[premium_animation] File For premium regular stickers, premium animation for the sticker.
[mask_position] MaskPosition For mask stickers, the position where the mask should be placed.
[custom_emoji_id] string For custom emoji stickers, unique identifier of the custom emoji.
[needs_repainting] boolean True, if the sticker must be repainted to a text color in messages.
[file_size] number File size in bytes.

StickerSet : Object

a sticker set.

Kind: global typedef
Properties

Name Type Description
name string Sticker set name.
title string Sticker set title.
sticker_type string Type of stickers in the set.
is_animated boolean True if the sticker set contains animated stickers.
is_video boolean True if the sticker set contains video stickers.
stickers Array.<Sticker> List of all set stickers.
[thumbnail] PhotoSize Optional. Sticker set thumbnail.

MaskPosition : Object

the position on faces where a mask should be placed by default.

Kind: global typedef
Properties

Name Type Description
point string The part of the face relative to which the mask should be placed.
x_shift number Shift by X-axis measured in widths of the mask scaled to the face size.
y_shift number Shift by Y-axis measured in heights of the mask scaled to the face size.
scale number Mask scaling coefficient.

InputSticker : Object

a sticker to be added to a sticker set.

Kind: global typedef
Properties

Name Type Description
sticker InputFile | string The added sticker.
emoji_list Array.<string> List of 1-20 emoji associated with the sticker.
[mask_position] MaskPosition Optional. Position where the mask should be placed on faces.
[keywords] Array.<string> Optional. List of 0-20 search keywords for the sticker.

InlineQueryResultsButton : Object

a button to be shown above inline query results.

Kind: global typedef
Properties

Name Type Description
text string Label text on the button.
[web_app] WebAppInfo Description of the Web App.
[start_parameter] string Deep-linking parameter.

one result of an inline query.

Kind: global typedef

InlineQueryResultArticle : Object

a link to an article or web page.

Kind: global typedef
Properties

Name Type Description
type string Type of the result, must be article.
id string Unique identifier for this result, 1-64 Bytes.
title string Title of the result.
input_message_content InputMessageContent Content of the message to be sent.
[reply_markup] InlineKeyboardMarkup Inline keyboard attached to the message.
[url] string URL of the result.
[hide_url] boolean Pass True if you don't want the URL to be shown in the message.
[description] string Short description of the result.
[thumbnail_url] string Url of the thumbnail for the result.
[thumbnail_width] number Thumbnail width.
[thumbnail_height] number Thumbnail height.

InlineQueryResultPhoto : Object

a link to a photo.

Kind: global typedef
Properties

Name Type Description
type string Type of the result, must be photo.
id string Unique identifier for this result, 1-64 bytes.
photo_url string A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB.
thumbnail_url string URL of the thumbnail for the photo.
[photo_width] number Width of the photo.
[photo_height] number Height of the photo.
[title] string Title for the result.
[description] string Short description of the result.
[caption] string Caption of the photo to be sent, 0-1024 characters after entities parsing.
[parse_mode] string Mode for parsing entities in the photo caption. See formatting options for more details.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption.
[reply_markup] InlineKeyboardMarkup Inline keyboard attached to the message.
[input_message_content] InputMessageContent Content of the message to be sent instead of the photo.

InlineQueryResultGif : Object

a link to an animated GIF file.

Kind: global typedef
Properties

Name Type Description
type string Type of the result, must be gif.
id string Unique identifier for this result, 1-64 bytes.
gif_url string A valid URL for the GIF file. File size must not exceed 1MB.
[gif_width] number Width of the GIF.
[gif_height] number Height of the GIF.
[gif_duration] number Duration of the GIF in seconds.
thumbnail_url string URL of the static JPEG or GIF or animated MPEG4 thumbnail for the result.
[thumbnail_mime_type] string MIME type of the thumbnail, must be one of image/jpeg, image/gif, or video/mp4.
[title] string Title for the result.
[caption] string Caption of the GIF file to be sent, 0-1024 characters after entities parsing.
[parse_mode] string Mode for parsing entities in the caption. See formatting options for more details.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption.
[reply_markup] InlineKeyboardMarkup Inline keyboard attached to the message.
[input_message_content] InputMessageContent Content of the message to be sent instead of the GIF animation.

InlineQueryResultMpeg4Gif : Object

a link to a video animation H.264/MPEG-4 AVC video without sound.

Kind: global typedef
Properties

Name Type Description
type string Type of the result, must be mpeg4_gif
id string Unique identifier for this result, 1-64 bytes
mpeg4_url string A valid URL for the MPEG4 file. File size must not exceed 1MB
[mpeg4_width] number Video width
[mpeg4_height] number Video height
[mpeg4_duration] number Video duration in seconds
thumbnail_url string URL of the static JPEG or GIF or animated MPEG4 thumbnail for the result
[thumbnail_mime_type] string MIME type of the thumbnail, must be one of image/jpeg, image/gif, or video/mp4. Defaults to image/jpeg
[title] string Title for the result.
[caption] string Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing.
[parse_mode] string Mode for parsing entities in the caption. See formatting options for more details.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption.
[reply_markup] InlineKeyboardMarkup Inline keyboard attached to the message.
[input_message_content] InputMessageContent Content of the message to be sent instead of the video animation.

InlineQueryResultVideo : Object

a link to a page containing an embedded video player or a video file.

Kind: global typedef
Properties

Name Type Description
type string Type of the result, must be video.
id string Unique identifier for this result, 1-64 bytes.
video_url string A valid URL for the embedded video player or video file.
mime_type string MIME type of the content of the video URL, text/html or video/mp4.
thumbnail_url string URL of the thumbnail JPEG only for the video.
title string Title for the result.
[caption] string Caption of the video to be sent, 0-1024 characters after entities parsing.
[parse_mode] string Mode for parsing entities in the video caption. See formatting options for more details.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption.
[video_width] number Video width.
[video_height] number Video height.
[video_duration] number Video duration in seconds.
[description] string Short description of the result.
[reply_markup] InlineKeyboardMarkup Inline keyboard attached to the message.
[input_message_content] InputMessageContent Content of the message to be sent instead of the video.

InlineQueryResultAudio : Object

a link to an MP3 audio file.

Kind: global typedef
Properties

Name Type Description
type string Type of the result, must be audio.
id string Unique identifier for this result, 1-64 bytes.
audio_url string A valid URL for the audio file.
title string Title.
[caption] string Caption, 0-1024 characters after entities parsing.
[parse_mode] string Mode for parsing entities in the audio caption.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption.
[performer] string Performer.
[audio_duration] number Audio duration in seconds.
[reply_markup] InlineKeyboardMarkup Inline keyboard attached to the message.
[input_message_content] InputMessageContent Content of the message to be sent instead of the audio.

InlineQueryResultVoice : Object

a link to a voice recording in an .OGG container encoded with OPUS.

Kind: global typedef
Properties

Name Type Description
type string Type of the result, must be voice.
id string Unique identifier for this result, 1-64 bytes.
voice_url string A valid URL for the voice recording.
title string Recording title.
[caption] string Caption, 0-1024 characters after entities parsing.
[parse_mode] string Mode for parsing entities in the voice message caption.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption.
[voice_duration] number Recording duration in seconds.
[reply_markup] InlineKeyboardMarkup Inline keyboard attached to the message.
[input_message_content] InputMessageContent Content of the message to be sent instead of the voice recording.

InlineQueryResultDocument : Object

a link to a file.

Kind: global typedef
Properties

Name Type Description
type string Type of the result, must be document.
id string Unique identifier for this result, 1-64 bytes.
title string Title for the result.
[caption] string Caption of the document to be sent, 0-1024 characters after entities parsing.
[parse_mode] string Mode for parsing entities in the document caption.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption.
document_url string A valid URL for the file.
mime_type string MIME type of the content of the file, either application/pdf or application/zip.
[description] string Short description of the result.
[reply_markup] InlineKeyboardMarkup Inline keyboard attached to the message.
[input_message_content] InputMessageContent Content of the message to be sent instead of the file.
[thumbnail_url] string URL of the thumbnail JPEG only for the file.
[thumbnail_width] number Thumbnail width.
[thumbnail_height] number Thumbnail height.

InlineQueryResultLocation : Object

a location on a map.

Kind: global typedef
Properties

Name Type Description
type string Type of the result, must be location.
id string Unique identifier for this result, 1-64 Bytes.
latitude number Location latitude in degrees.
longitude number Location longitude in degrees.
title string Location title.
[horizontal_accuracy] number The radius of uncertainty for the location, measured in meters; 0-1500.
[live_period] number Period in seconds for which the location can be updated, should be between 60 and 86400.
[heading] number For live locations, a direction in which the user is moving, in degrees.
[proximity_alert_radius] number For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters.
[reply_markup] InlineKeyboardMarkup Inline keyboard attached to the message.
[input_message_content] InputMessageContent Content of the message to be sent instead of the location.
[thumbnail_url] string Url of the thumbnail for the result.
[thumbnail_width] number Thumbnail width.
[thumbnail_height] number Thumbnail height.

InlineQueryResultVenue : Object

a venue. By default, the venue will be sent by the user.

Kind: global typedef
Properties

Name Type Description
type string Must be venue.
id string Unique identifier, 1-64 bytes.
latitude number Latitude of the venue.
longitude number Longitude of the venue.
title string Title of the venue.
address string Address of the venue.
[foursquare_id] string Optional. Foursquare ID of the venue.
[foursquare_type] string Optional. Foursquare type of the venue.
[google_place_id] string Optional. Google Places ID of the venue.
[google_place_type] string Optional. Google Places type of the venue.
[reply_markup] InlineKeyboardMarkup Optional. Inline keyboard attached to the message.
[input_message_content] InputMessageContent Optional. Content to be sent instead of the venue.
[thumbnail_url] string Optional. URL of the result's thumbnail.
[thumbnail_width] number Optional. Thumbnail width.
[thumbnail_height] number Optional. Thumbnail height.

InlineQueryResultContact : Object

a contact with a phone number.

Kind: global typedef
Properties

Name Type Description
type string Must be contact.
id string Unique identifier, 1-64 bytes.
phone_number string Contact's phone number.
first_name string Contact's first name.
[last_name] string Optional. Contact's last name.
[vcard] string Optional. VCard of the contact.
[reply_markup] InlineKeyboardMarkup Optional. Inline keyboard attached to the message.
[input_message_content] InputMessageContent Optional. Content to be sent instead of the contact.
[thumbnail_url] string Optional. URL of the result's thumbnail.
[thumbnail_width] number Optional. Thumbnail width.
[thumbnail_height] number Optional. Thumbnail height.

InlineQueryResultGame : Object

a Game.

Kind: global typedef
Properties

Name Type Description
type string Must be game.
id string Unique identifier, 1-64 bytes.
game_short_name string Short name of the game.
[reply_markup] InlineKeyboardMarkup Optional. Inline keyboard attached to the message.

InlineQueryResultCachedPhoto : Object

a link to a photo stored on the Telegram servers.

Kind: global typedef
Properties

Name Type Description
type string Type of the result, must be photo.
id string Unique identifier for this result, 1-64 bytes.
photo_file_id string A valid file identifier of the photo.
[title] string Title for the result.
[description] string Short description of the result.
[caption] string Caption of the photo to be sent, 0-1024 characters after entities parsing.
[parse_mode] string Mode for parsing entities in the photo caption.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption.
[reply_markup] InlineKeyboardMarkup Inline keyboard attached to the message.
[input_message_content] InputMessageContent Content of the message to be sent instead of the photo.

InlineQueryResultCachedGif : Object

a link to an animated GIF file stored on the Telegram servers.

Kind: global typedef
Properties

Name Type Description
type string Type of the result, must be gif
id string Unique identifier for this result, 1-64 bytes
gif_file_id string A valid file identifier for the GIF file
[title] string Title for the result
[caption] string Caption of the GIF file to be sent, 0-1024 characters after entities parsing
[parse_mode] string Mode for parsing entities in the caption.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption.
[reply_markup] InlineKeyboardMarkup Inline keyboard attached to the message.
[input_message_content] InputMessageContent Content of the message to be sent instead of the GIF animation.

InlineQueryResultCachedMpeg4Gif : Object

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

Kind: global typedef
Properties

Name Type Description
type string Type of the result, must be mpeg4_gif.
id string Unique identifier for this result, 1-64 bytes.
mpeg4_file_id string A valid file identifier for the MPEG4 file.
[title] string Title for the result.
[caption] string Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing.
[parse_mode] string Mode for parsing entities in the caption.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption.
[reply_markup] InlineKeyboardMarkup Inline keyboard attached to the message.
[input_message_content] InputMessageContent Content of the message to be sent instead of the video animation.

InlineQueryResultCachedSticker : Object

a link to a sticker stored on the Telegram servers.

Kind: global typedef
Properties

Name Type Description
type string The type of the result, must be sticker
id string Unique identifier for this result.
sticker_file_id string A valid file identifier of the sticker.
[reply_markup] InlineKeyboardMarkup Inline keyboard attached to the message.
[input_message_content] InputMessageContent Content of the message to be sent instead of the sticker.

InlineQueryResultCachedDocument : Object

Kind: global typedef
Properties

Name Type Description
type string The type of the result, must be document
id string Unique identifier for this result.
title string Title for the result.
document_file_id string A valid file identifier for the file.
[description] string Short description of the result.
[caption] string Caption of the document to be sent.
[parse_mode] string Mode for parsing entities in the document caption.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption.
[reply_markup] InlineKeyboardMarkup Inline keyboard attached to the message.
[input_message_content] InputMessageContent Content of the message to be sent instead of the file.

InlineQueryResultCachedVideo : Object

a link to a video file stored on the Telegram servers.

Kind: global typedef
Properties

Name Type Description
type string The type of the result, must be video
id string Unique identifier for this result.
video_file_id string A valid file identifier for the video file.
title string Title for the result.
[description] string Short description of the result.
[caption] string Caption of the video to be sent.
[parse_mode] string Mode for parsing entities in the video caption.
[caption_entities] Array.<MessageEntity> List of special entities that appear in the caption.
[reply_markup] InlineKeyboardMarkup Inline keyboard attached to the message.
[input_message_content] InputMessageContent Content of the message to be sent instead of the video.

InlineQueryResultCachedVoice : Object

a link to a voice message stored on the Telegram servers.

Kind: global typedef
Properties

Name Type Description
type string Type of the result, must be voice.
id string Unique identifier for this result, 1-64 bytes.
voice_file_id string A valid file identifier for the voice message.
title string Voice message title.
[caption] string Optional. Caption, 0-1024 characters after entities parsing.
[parse_mode] string Optional. Mode for parsing entities in the caption.
[caption_entities] Array.<MessageEntity> Optional. List of special entities in the caption.
[reply_markup] InlineKeyboardMarkup Optional. Inline keyboard attached to the message.
[input_message_content] InputMessageContent Optional. Content of the message to be sent instead of the voice message.

InlineQueryResultCachedAudio : Object

a link to an MP3 audio file stored on the Telegram servers.

Kind: global typedef
Properties

Name Type Description
type string Type of the result, must be audio.
id string Unique identifier for this result, 1-64 bytes.
audio_file_id string A valid file identifier for the audio file.
[caption] string Optional. Caption, 0-1024 characters after entities parsing.
[parse_mode] string Optional. Mode for parsing entities in the caption.
[caption_entities] Array.<MessageEntity> Optional. List of special entities in the caption.
[reply_markup] InlineKeyboardMarkup Optional. Inline keyboard attached to the message.
[input_message_content] InputMessageContent Optional. Content of the message to be sent instead of the audio.

the content of a message to be sent as a result of an inline query.

Kind: global typedef

InputTextMessageContent : Object

the content of a text message to be sent as the result of an inline query.

Kind: global typedef
Properties

Name Type Description
message_text string Text of the message to be sent.
[parse_mode] string Mode for parsing entities in the message text.
[entities] Array.<MessageEntity> List of special entities in message text.
[link_preview_options] LinkPreviewOptions Link preview generation options.

InputLocationMessageContent : Object

the content of a location message to be sent as the result of an inline query.

Kind: global typedef
Properties

Name Type Description
latitude number Latitude of the location.
longitude number Longitude of the location.
[horizontal_accuracy] number The radius of uncertainty for the location.
[live_period] number Period for which the location can be updated.
[heading] number Direction in which the user is moving.
[proximity_alert_radius] number Maximum distance for proximity alerts.

InputVenueMessageContent : Object

the content of a venue message to be sent as the result of an inline query.

Kind: global typedef
Properties

Name Type Description
latitude number Latitude of the venue.
longitude number Longitude of the venue.
title string Name of the venue.
address string Address of the venue.
[foursquare_id] string Foursquare identifier of the venue.
[foursquare_type] string Foursquare type of the venue, if known. For example, arts_entertainment/default, arts_entertainment/aquarium or food/icecream.
[google_place_id] string Google Places identifier of the venue.
[google_place_type] string Google Places type of the venue.

InputContactMessageContent : Object

the content of a contact message to be sent as the result of an inline query.

Kind: global typedef
Properties

Name Type Description
phone_number string Contact's phone number.
first_name string Contact's first name.
[last_name] string Contact's last name.
[vcard] string Additional data about the contact in the form of a vCard.

InputInvoiceMessageContent : Object

the content of an invoice message to be sent as the result of an inline query.

Kind: global typedef
Properties

Name Type Description
title string Product name.
description string Product description.
payload string Bot-defined invoice payload.
provider_token string Payment provider token.
currency string Three-letter ISO 4217 currency code.
prices Array.<LabeledPrice> Price breakdown.
[max_tip_amount] number The maximum accepted amount for tips.
[suggested_tip_amounts] Array.<number> Suggested amounts of tip.
[provider_data] string Data about the invoice for the payment provider.
[photo_url] string URL of the product photo for the invoice.
[photo_size] number Photo size in bytes.
[photo_width] number Photo width.
[photo_height] number Photo height.
[need_name] boolean If the user's full name is required.
[need_phone_number] boolean If the user's phone number is required.
[need_email] boolean If the user's email address is required.
[need_shipping_address] boolean If the user's shipping address is required.
[send_phone_number_to_provider] boolean If the user's phone number should be sent to the provider.
[send_email_to_provider] boolean If the user's email address should be sent to the provider.
[is_flexible] boolean If the final price depends on the shipping method.

SentWebAppMessage : Object

an inline message sent by a Web App on behalf of a user.

Kind: global typedef
Properties

Name Type Description
[inline_message_id] string Identifier of the sent inline message.

answerShippingQuery : Object

If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot.

Kind: global typedef
Properties

Name Type Description
shipping_query_id string Unique identifier for the query.
ok boolean True if delivery is possible, False otherwise.
[shipping_options] Array.<ShippingOption> Available shipping options.
[error_message] string Error message if delivery is not possible.

answerPreCheckoutQuery : Object

Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query.

Kind: global typedef
Properties

Name Type Description
pre_checkout_query_id string Unique identifier for the query.
ok boolean True if order can proceed, False otherwise.
[error_message] string Error message if order cannot proceed.

LabeledPrice : Object

a portion of the price for goods or services.

Kind: global typedef
Properties

Name Type Description
label string Portion label.
amount number Price of the product in the smallest units of the currency.

ShippingAddress : Object

a shipping address.

Kind: global typedef
Properties

Name Type Description
country_code string Two-letter ISO 3166-1 alpha-2 country code.
state string State, if applicable.
city string City.
street_line1 string First line for the address.
street_line2 string Second line for the address.
post_code string Address post code.

OrderInfo : Object

information about an order.

Kind: global typedef
Properties

Name Type Description
[name] string User name.
[phone_number] string User's phone number.
[email] string User email.
[shipping_address] ShippingAddress User shipping address.

ShippingOption : Object

one shipping option.

Kind: global typedef
Properties

Name Type Description
id string Shipping option identifier.
title string Option title.
prices Array.<LabeledPrice> List of price portions.

PassportData : Object

Telegram Passport data shared with the bot by the user.

Kind: global typedef
Properties

Name Type Description
data Array.<EncryptedPassportElement> Array with information about documents and other Telegram Passport elements.
credentials EncryptedCredentials Encrypted credentials.

PassportFile : Object

a file uploaded to Telegram Passport.

Kind: global typedef
Properties

Name Type Description
file_id string Identifier for this file.
file_unique_id string Unique identifier for this file.
file_size number File size in bytes.
file_date number Unix time when the file was uploaded.

EncryptedPassportElement : Object

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

Kind: global typedef
Properties

Name Type Description
type string Element type.
[data] string Base64-encoded encrypted data.
[phone_number] string User's verified phone number.
[email] string User's verified email address.
[files] Array.<PassportFile> Array of encrypted files with documents.
[front_side] PassportFile Encrypted file with the front side of the document.
[reverse_side] PassportFile Encrypted file with the reverse side of the document.
[selfie] PassportFile Encrypted file with the selfie of the user holding a document.
[translation] Array.<PassportFile> Array of encrypted files with translated versions of documents.
hash string Base64-encoded element hash.

EncryptedCredentials : Object

data required for decrypting and authenticating EncryptedPassportElement.

Kind: global typedef
Properties

Name Type Description
data string Base64-encoded encrypted JSON-serialized data.
hash string Base64-encoded data hash for authentication.
secret string Base64-encoded secret for data decryption.

PassportElementErrorDataField : Object

an issue in one of the data fields that was provided by the user.

Kind: global typedef
Properties

Name Type Description
source string Error source, must be data.
type string Section of the user's Telegram Passport which has the error.
field_name string Name of the data field which has the error.
data_hash string Base64-encoded data hash.
message string Error message.

PassportElementErrorFrontSide : Object

an issue with the front side of a document.

Kind: global typedef
Properties

Name Type Description
source string Error source, must be front_side.
type string Section of the user's Telegram Passport which has the issue.
file_hash string Base64-encoded hash of the file with the front side.
message string Error message.

an error in the Telegram Passport element which was submitted that should be resolved by the user.

Kind: global typedef

PassportElementErrorReverseSide : Object

an issue with the reverse side of a document.

Kind: global typedef
Properties

Name Type Description
source string Error source, must be reverse_side.
type string The section of the user's Telegram Passport which has the issue, one of driver_license, identity_card.
file_hash string Base64-encoded hash of the file with the reverse side of the document.
message string Error message.

PassportElementErrorSelfie : Object

an issue with the selfie with a document.

Kind: global typedef
Properties

Name Type Description
source string Error source, must be selfie
type string The section of the user's Telegram Passport which has the issue, one of passport, driver_license, identity_card, internal_passport.
file_hash string Base64-encoded hash of the file with the selfie.
message string Error message.

PassportElementErrorFile : Object

an issue with a document scan.

Kind: global typedef
Properties

Name Type Description
source string Error source, must be file
type string The section of the user's Telegram Passport which has the issue, one of utility_bill, bank_statement, rental_agreement, passport_registration, temporary_registration.
file_hash string Base64-encoded file hash.
message string Error message

PassportElementErrorFiles : Object

an issue with a list of scans.

Kind: global typedef
Properties

Name Type Description
source string Error source, must be files
type string The section of the user's Telegram Passport which has the issue, one of utility_bill, bank_statement, rental_agreement, passport_registration, temporary_registration.
file_hashes Array.<string> List of base64-encoded file hashes.
message string Error message.

PassportElementErrorTranslationFile : Object

an issue with one of the files that constitute the translation of a document.

Kind: global typedef
Properties

Name Type Description
source string Error source, must be translation_file.
type string Type of Telegram Passport element with the issue.
file_hash string Base64-encoded file hash.
message string Error message.

PassportElementErrorTranslationFiles : Object

an issue with the translated version of a document.

Kind: global typedef
Properties

Name Type Description
source string Error source, must be translation_files.
type string Type of Telegram Passport element with the issue.
file_hashes Array.<string> List of base64-encoded file hashes.
message string Error message.

PassportElementErrorUnspecified : Object

an issue in an unspecified place.

Kind: global typedef
Properties

Name Type Description
source string Error source, must be unspecified.
type string Type of Telegram Passport element with the issue.
element_hash string Base64-encoded element hash.
message string Error message.

GameHighScore : Object

one row of the high scores table for a game.

Kind: global typedef
Properties

Name Type Description
position number Position in high score table for the game.
user User User.
score number Score.

SheetOperations : Object

sheet operations.

Kind: global typedef
Properties

Name Type Description
appendRow function Adds a new row to the end of the sheet.
clear function Clears the entire sheet.
clearByRange function Clears a specific range in the sheet.
clearValue function Clears the content of a specific cell.
findOne function Finds the next cell matching the query.
findAll function Finds all cells matching the query.
deleteColumn function Deletes a specific column.
deleteColumns function Deletes a specific number of columns starting from the given index.
deleteRow function Deletes a specific row.
deleteRows function Deletes a specific number of rows starting from the given index.
getSheetData function Gets all data from the sheet.
getLastColumn function Gets the last column that has content.
getLastRow function Gets the last row that has content.
insertColumnAfter function Inserts a column after the specified column index.
insertColumnBefore function Inserts a column before the specified column index.
insertColumns function Inserts the specified number of columns at the specified column index.
insertColumnsAfter function Inserts the specified number of columns after a given position.
insertColumnsBefore function Inserts the specified number of columns before a given position.
insertRowAfter function Inserts a row after the specified row index.
insertRowBefore function Inserts a row before the specified row index.
insertRows function Inserts the specified number of rows at the specified row index.
insertRowsAfter function Inserts the specified number of rows after a given position.
insertRowsBefore function Inserts the specified number of rows before a given position.
moveColumns function Moves a column from one position to another.
moveRows function Moves a row from one position to another.
setName function Sets the name of the sheet.
sortByColumn function Sorts the sheet based on the specified column.
saveOne function Saves a single value to a specified cell.
saveMany function Saves a range of values to the specified area.
getValue function Gets the value of a specific cell.
getValues function Gets values from a specified range.
Clone this wiki locally