If set to true
, first eligible call will avoid performing a POST request.
Note that such a call:
https://core.telegram.org/bots/faq#how-can-i-make-requests-in-response-to-updates https://github.com/telegraf/telegraf/pull/1250
Add a new sticker to a set created by the bot
User identifier of sticker set owner
Sticker set name
Send answers to an inline query. No more than 50 results per query are allowed.
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. 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. Reply to shipping queries.
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.
Close the bot instance before moving it from one local server to another
Send copy of existing message
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
Message identifier in the chat specified in from_chat_id
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
Delete a message, including service messages, with the following limitations:
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Delete a sticker from a set created by the bot.
File identifier of the sticker
Remove webhook integration
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.
Required if inlineMessageId is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Required if inlineMessageId is not specified. Identifier of the sent message
Required if chatId and messageId are not specified. Identifier of the inline message
New caption of the message
Edit animation, audio, document, photo, or video messages. If a message is a part of a message album, then it can be edited only to a photo or a video. Otherwise, message type can be changed arbitrarily. When inline message is edited, new file can't be uploaded. Use previously uploaded file via its file_id or specify a URL.
Required if inlineMessageId is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Required if inlineMessageId is not specified. Identifier of the sent message
Required if chatId and messageId are not specified. Identifier of the inline message
New media of message
Edit only the reply markup of messages sent by the bot or via the bot (for inline bots).
Required if inlineMessageId is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Required if inlineMessageId is not specified. Identifier of the sent message
Required if chatId and messageId are not specified. Identifier of the inline message
A JSON-serialized object for an inline keyboard.
If edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
Edit text and game 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.
Required if inlineMessageId is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Required if inlineMessageId is not specified. Identifier of the sent message
Required if chatId and messageId are not specified. Identifier of the inline message
New text of the message
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.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Forward existing message.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
Message identifier in the chat specified in from_chat_id
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.)
Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
Get information about a member of a chat.
Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
Unique identifier of the target user
Get the number of members in a chat
Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
Get basic info about a file and prepare it for downloading
Id of file to get link to
Get download link to a file
Get basic information about the bot
Get the current list of the bot's commands.
Directly request incoming updates.
You should probably use Telegraf::launch
instead.
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 for the target group or username of the target supergroup or channel (in the format @channelusername
)
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
Use this method for your bot to leave a group, supergroup or channel
Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
Log out from the cloud Bot API server before launching the bot locally
Pin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in the supergroup or 'can_edit_messages' admin right in the channel.
Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
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 for the target chat or username of the target channel (in the format @channelusername
)
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.
Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
Send .gif animations
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Send audio files, 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.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
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).
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Send copy of existing message.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Received message object
Send a dice, which will have a random value from 1 to 6.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
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.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Unique identifier for the target chat
Unique identifier for the target private chat
Send point on the map
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Send a group of photos or videos as an album
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
A JSON-serialized array describing photos and videos to be sent, must include 2–10 items
Send a text message
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Text of the message to be sent
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Send a native poll.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Poll question, 1-255 characters
A JSON-serialized list of answer options, 2-10 strings 1-100 characters each
Send a native quiz.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Poll question, 1-255 characters
A JSON-serialized list of answer options, 2-10 strings 1-100 characters each
Send .webp stickers
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
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.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Send video messages
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
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.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
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
Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername
)
New chat title, 1-255 characters
Change the list of the bot's commands.
A list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified.
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
Specify a url to receive incoming updates via an outgoing webhook
HTTPS url to send updates to. Use an empty string to remove webhook integration
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Identifier of the original message with the poll
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 for the target group or username of the target supergroup or channel (in the format @username)
Unique identifier of the target user
Clear the list of pinned messages in a chat
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Unpin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in the supergroup or 'can_edit_messages' admin right in the channel.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
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.
Generated using TypeDoc
If set to
true
, first eligible call will avoid performing a POST request. Note that such a call:https://core.telegram.org/bots/faq#how-can-i-make-requests-in-response-to-updates https://github.com/telegraf/telegraf/pull/1250