Inline Mode
Inline mode lets users interact with your bot from any chat by typing@your_bot_name followed by a query. Your bot receives an inline_query update and must respond with results.
answerInlineQuery
Sends answer results back to an inline query. Must be called within 10 seconds of receiving the query.
Result types:
article, photo, gif, mpeg4_gif, video, audio, voice, document, location, venue, contact, game, and cached variants.
BLP Example
savePreparedInlineMessage
Saves a message to be sent to a user via an inline query.Bot Configuration
setMyCommands
Registers the bot’s command list, visible in the Telegram/ menu.
BLP Example
deleteMyCommands
Deletes the bot’s command list. After this, Telegram shows no menu commands.BLP Example
getMyCommands
Gets the current list of registered commands.BLP Example
setMyName
Sets the bot’s display name.BLP Example
getMyName
Gets the bot’s current display name.setMyDescription
Sets the bot’s “What can this bot do?” description shown on the start page.BLP Example
getMyDescription
Gets the current bot description.setMyShortDescription
Sets the short description shown in the bot’s profile.BLP Example
getMyShortDescription
Gets the current short description of the bot.setMyProfilePhoto
Sets the profile photo of the bot.removeMyProfilePhoto
Removes the profile photo of the bot.setChatMenuButton
Sets the menu button shown in private chats with the bot.BLP Example
getMe
Returns basic information about the bot.
Returns fields like
id, is_bot, first_name, username, can_join_groups, can_read_all_group_messages, supports_inline_queries.
BLP Example
Web Apps
answerWebAppQuery
Sets the result of an interaction with a Web App and sends a corresponding message on behalf of the user to the chat from which the query originated.sendChatJoinRequestWebApp
Allows a Web App to create a request for a user to join a channel or a group.Payments and Deliveries
answerPreCheckoutQuery
Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update. Use this method to respond to such pre-checkout queries.answerShippingQuery
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. Use this method to reply.Stories
editStory
Edits a story previously posted by the bot.deleteStory
Deletes a story posted by the bot.Prepared Keyboard Buttons
savePreparedKeyboardButton
Saves a keyboard button that allows a user to perform an action on behalf of the bot.Webhooks and System
getUpdates
Receives incoming updates using long polling (receive events manually if not using webhooks). Note: BLP uses webhooks internally, so calling this directly may interfere with normal bot operation in some contexts.setWebhook
Specifies a URL and receives incoming updates via an outgoing webhook. BLP automatically handles this, so this method is mostly for advanced custom integrations or migrating bots out of BLP.getWebhookInfo
Gets current webhook status.deleteWebhook
Removes webhook integration.logOut
Logs out the bot from the cloud server. After this, you can invokeclose and run the bot locally.
close
Closes the bot instance on the cloud server before moving it to a local server.Managed Bots (Bots owned by other Bots)
getManagedBotAccessSettings
Gets settings for a managed bot access.setManagedBotAccessSettings
Changes settings for a managed bot access.getManagedBotToken
Gets the token of a managed bot.replaceManagedBotToken
Replaces the token of a managed bot.Guest Queries & Suggested Posts
answerGuestQuery
Answers a guest query for a Web App or game.approveSuggestedPost
Approves a suggested post on a channel.declineSuggestedPost
Declines a suggested post on a channel.Bot Management (BLP Platform)
These are Bots.LT-specific methods, not part of the standard Telegram API.Bot.info
Returns detailed information about the current bot from the Bots.LT platform.The full documentation for bot variables and
Bot.info() is covered together in BLP Syntax & Variables → Bot Details.Bot.Transfer
Programmatically transfers ownership of the bot to another Bots.LT user via their registered email or username.* EitherReturnsusernameis required.
{"ok": True, "bot_id": "new_bot_id"} on success.
BLP Example
Bot.Clone
Creates an exact copy of the bot (all commands and code). Optionally assigns a new Telegram token immediately.
Returns
{"ok": True, "bot_id": "new_bot_id"} on success.
BLP Example
BLP Engine Methods
These methods control the BLP execution engine and are specific to Bots.LT.Bot.handleNextCommand
Sets up a wait state for the next user input. The next message from the user will trigger the specified command instead of matching normally.
Aliases:
Bot.handleNextCommand, Bot.runCommandAfter (see below)
BLP Example
Bot.runCommand
Programmatically triggers another command’s code from within the current command.BLP Example
Bot.runCommandAfter
Schedules a command to run after a delay.BLP Example
Bot.broadcast
Sends a message or runs a command for multiple users at once.BLP Example
Bot.getBroadcastStatus
Gets the status of a running or completed broadcast.BLP Example
Bot.pauseBroadcast / Bot.resumeBroadcast / Bot.stopBroadcast
Controls a running broadcast.BLP Example
sendInvoice
Sends an invoice for payments.BLP Example
createInvoiceLink
Creates a link for an invoice.BLP Example
setPassportDataErrors
Informs a user that some of the Telegram Passport elements they provided contains errors.BLP Example
