botslt) is a powerful command-line tool designed to help developers write and manage bot commands locally using their favorite IDE (like VS Code, PyCharm).
Instead of writing code in the web editor, you can write Python files locally and push them to your bot instantly.
Installation
You need Python 3.8+ installed on your computer. Install the CLI using pip:Quick Start Guide
1. Login
First, you need to authenticate your CLI with your Bots.LT account using your API key. You can get your API Key from Dashboard → Settings → Security.~/.botslt/credentials.json.
2. Initialize a Project
Create a folder for your bot and runblp init inside it.
42294666) and generate a blp.json configuration file and a sample start.py file.
3. Add Commands
To map a Telegram command to a local Python file, use theadd command:
blp.json file. You can also edit blp.json manually to configure aliases.
4. Push Code to Server
Whenever you finish writing code in your Python files, sync them to the server:botslt.lock file to only push files that have actually changed since your last push!
blp.json Configuration
Theblp.json file acts as the registry for your bot’s commands. It links the command triggers to your local .py files.
Basic Structure with Aliases
You can define aliases for your commands by using the dictionary structure:/start command will be automatically triggered even if the user types /menu or Start Bot.
All Commands Reference
Git Integration
Bots.LT CLI is designed to play nicely with Git.- Commit
blp.jsonand your.pyfiles to your Git repository. - Never commit
botslt.lock(it is automatically ignored via.gitignore). - If you use version control, you and your team can collaborate locally and
blp pushto deploy!
