List of Telegram user IDs to allow interactions with
Use this method to add a new sticker to a set created by the bot
User identifier of sticker set owner
Sticker set name
Sticker object
Returns True on success.
Use this method to send answers to game query.
Notification text
Use this method to send answers to an inline query. No more than 50 results per query are allowed.
Array of results for the inline query
Extra optional parameters
On success, True is returned.
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. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.
Specify True if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use False if there are any problems.
Required if ok is False. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user.
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. Use this method to reply to shipping queries. On success, True is returned.
Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)
Required if ok is True. A JSON-serialized array of available shipping options.
Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.
Use this method to create new sticker set owned by a user. The bot will be able to edit the created sticker set
User identifier of created sticker set owner
Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in “by
Sticker set title, 1-64 characters
Sticker object
Returns True on success.
Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
True on success
Use this method to delete a message, including service messages, with the following limitations:
Returns True on success.
Use this method to delete a sticker from a set created by the bot.
File identifier of the sticker
Returns True on success
Use this method to edit captions of messages sent by the bot or via the bot (for inline bots). On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
New caption of the message
Markup of inline keyboard
Use this method to edit live location messages.
New latitude
New longitude
On success, if the edited message was sent by the bot, the edited message is returned, otherwise True is returned.
Use this method to edit animation, audio, document, photo, or video messages.
New media of message
On success, if the edited message was sent by the bot, the edited Message is returned, otherwise True is returned.
Use this method to edit only the reply markup of messages sent by the bot or via the bot (for inline bots).
Markup of inline keyboard
On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
Use this method to edit text and game messages sent by the bot or via the bot (for inline bots).
New text of the message
Extra params
On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
Use this method to export an invite link to a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
exported invite link as String on success.
Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)
a Chat object on success.
Use this method to get a list of administrators in a chat.
On success, returns an Array of ChatMember objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned.
Use this method to get information about a member of a chat.
Unique identifier of the target user
a ChatMember object on success
Use this method to get the number of members in a chat
Number on success
Use this method to get a sticker set
Name of the sticker set
On success, a StickerSet object is returned.
Use this method to kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights
Unique identifier of the target user
Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever
True on success
Use this method for your bot to leave a group, supergroup or channel
True on success
Use this method to pin a message in a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights
Identifier of a message to pin
Pass { disable_notification: true }
, if it is not necessary to send a notification to all group members about the new pinned message
True on success
Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass False for all boolean parameters to demote a user.
Unique identifier of the target user
True on success
Use this method to reply on messages in the same chat.
Text of the message to be sent
SendMessage additional params
sent Message if Success
Use this method to send audio files to the same chat, if you want Telegram clients to display them in the music player. Your audio must be in the .mp3 format. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data
Audio extra parameters
On success, the sent Message is returned.
Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Choose one, depending on what the user is about to receive:
Type of action to broadcast.
True on success
Use this method to send a dice, which will have a random value from 1 to 6. On success, the sent Message is returned. (Yes, we're aware of the “proper” singular of die. But it's awkward, and we decided to help it change. One dice at a time!)
Additional params to send dice
a Message on success
Use this method to send general files. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data
Additional params for send document
a Message on success
Use this method to send a game
Short name of the game, serves as the unique identifier for the game. Set up your games via Botfather.
Additional params for send game
a Message on success
The Bot API supports basic formatting for messages
You can use bold and italic text, as well as inline links and pre-formatted code in your bots' messages.
Additional params to send message
a Message on success
Use this method to send invoices
Object with new invoice params
Additional params for send invoice
a Message on success
Use this method to send point on the map
Latitude of location
Longitude of location
Additional params for send location
a Message on success
The Bot API supports basic formatting for messages
You can use bold and italic text, as well as inline links and pre-formatted code in your bots' messages.
Additional params to send message
a Message on success
Use this method to send a group of photos or videos as an album
A JSON-serialized array describing photos and videos to be sent, must include 2–10 items
Additional params to send media group
On success, an array of the sent Messages is returned
Use this method to send photos
Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data
Additional params to send photo
a Message on success
Use this method to send a native poll.
Poll question, 1-255 characters
A JSON-serialized list of answer options, 2-10 strings 1-100 characters each
Additional params to send poll
On success, the sent Message is returned.
Use this method to send a native quiz.
Poll question, 1-255 characters
A JSON-serialized list of answer options, 2-10 strings 1-100 characters each
Additional params to send quiz
On success, the sent Message is returned.
Use this method to send .webp stickers
Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .webp file from the Internet, or upload a new one using multipart/form-data
Additional params to send sticker
a Message on success
Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document) Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data
Additional params to send video
a Message on success
Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data
Additional params to send voice
a Message on success
Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass True for all boolean parameters to lift restrictions from a user. Returns True on success.
Additional params for restrict chat member
True on success
Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights
New chat title, 1-255 characters
True on success
Use this method to move a sticker in a set created by the bot to a specific position
File identifier of the sticker
New sticker position in the set, zero-based
Returns True on success.
Use this method to stop updating a live location message before live_period expires.
Extra params
On success, if the message was sent by the bot, the sent Message is returned, otherwise True is returned.
Use this method to send a native quiz.
Identifier of the original message with the poll
Additional params to stop poll
On success, the stopped Poll with the final results is returned.
Use this method to unban a user from a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights
Unique identifier of the target user
True on success
Use this method to unpin a message in a group, a supergroup, or a channel.
True on success
Use this method to upload a .png file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times) https://core.telegram.org/bots/api#sending-files
User identifier of sticker file owner
Png image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px.
Returns the uploaded File on success
Generated using TypeDoc
UserOnly bot context which contains a list of user IDs to allow interaction with