Skip to main content
Bots.LT uses a custom execution environment called BLP (Bots.LT Python). BLP is built on top of standard Python 3, but with specific security restrictions to ensure safe and blazing-fast execution on our cloud platform.

What is BLP Language?

When you write commands in Bots.LT, you are writing Python code. However, you cannot use operations that could compromise the server:
  • import statements are blocked.
  • open(), eval(), and exec() are blocked.
  • time.sleep() is blocked.
  • Infinite loops (while True) are blocked to prevent execution timeouts.
Instead of importing modules, Bots.LT injects safe Built-in Objects and Variables directly into your code.

Global Variables

Whenever a command runs, the following variables are automatically available in your code. You do NOT need to define or import them.

Context Variables

Bot Details

The following variables give you instant access to the current bot’s basic information. They are injected automatically — no function call needed. For advanced platform data, you can also call Bot.info() directly. This returns a DotDict with additional fields: owner_email, status, and userstat (total users). It also supports querying other bots you own.
BLP Example

The Bot Object

In BLP, the Telegram engine is injected as the Bot object. This object handles all API calls like Bot.sendMessage.
Note: For convenience and flexibility, Bot and bot are 100% interchangeable aliases. Every method that works on Bot also works identically on bot.
BLP Example

Built-in Modules

We provide safe wrappers for common Python functionalities directly in the global scope.
BLP Example

Data Storage Scopes

You do not need an external database. Bots.LT provides a blazing-fast built-in Key-Value (KV) store accessible via three scopes: See the Data Storage & Wait States section for more details on these scopes.