KitDev / Guides / Assistant bot
Assistant bot
A user account can't send buttons on Telegram, only a bot can. That's why KitDev creates an assistant bot and runs it inside the same process while the userbot is on.
What it does
- Creates itself: the userbot talks to @BotFather from your account, with the name
KitDev Assistantand a random username likekitdev_a1b2c3_bot. - Photo: when created, it gets a random image from
assets/avatars/. You can change it whenever you want with.botfoto, or by choosing the photo yourself from its private chat (see below). - Logs: the bot posts the start and stop notices in the KitDev Logs group.
.helpmenu: the userbot asks the bot for the menu through inline mode, which BotFather enables by itself. The menu appears as "via @your_bot", with a photo and buttons to switch pages. The ⚙️ Settings button opens the private chat with the bot directly in the settings (linkt.me/your_bot?start=settings). If you enable ephemeral messages (Settings → Help → Ephemeral; it is off by default), in groups where the assistant bot is an administrator only you see the menu (Bot API 10.3) and the Close button makes it disappear. If the bot is not an admin of the group (or you are in a private chat), the normal menu is sent. Its photo, video or GIF is changed in Settings → Help (if you don't choose, a random image fromassets/avatarsis used). With.help name(for example.help info) you see a plugin's commands and their descriptions as text; a command's name also works./startmenu: in its private chat you have a menu with your settings (see the next section). Only you see it.- PM Bot: if another person writes to it, the bot can forward their messages to you. See the PM Bot guide.
- Group moderation: it can use the same administration commands in groups where it is an admin.
- Only for you: if another person presses a button of
.helpor of the/startmenu, they see a notice and nothing happens.
The /start menu
Open the bot's private chat and press Start (/start):
| Button | What it does |
|---|---|
| 🌐 Language | Spanish or English (below) |
| ⚙️ Settings | PM Bot, PM Permit, Help, .info emojis, Alive, Admin (administrator mode), Sudo (sudo panel), Auto-delete, Prefix and Backups (automatic backups) |
| ✨ Stats | Shows your account and KitDev data (below) |
| 📻 Broadcast | Sends a message to all the bot's users (below) |
| 🌎 Time zone | Choose your zone (below) |
| 🖼 Change bot photo | Sets a new photo for the bot (below) |
All the menus are rich messages with the buttons inside and in color: green to turn on, add or confirm, red to turn off, delete, reset or cancel, blue to enter a section or change a value, and no color to go back.
Language
The assistant works in Spanish (default) and English. Choose the language in 🌐 Language, with immediate effect and no restart. It is saved in data/state.json.
The language affects:
- The
/startmenu, the settings and the assistant's notices - The
.helpmenu, the command descriptions and their explanation - The plugins' replies in your chats, including the errors you see
- The texts seen by whoever writes to the bot (welcome, notices and antispam)
The console and the logs group stay in Spanish.
Time zone
It is used in the {time} variable of .alive. The default is UTC.
- Quick ones: Guayaquil, Bogotá, Lima, Mexico City, Buenos Aires, Madrid, New York and UTC.
- ✏️ Other zone: type the name of your city, for example
GuayaquilorSão Paulo. Capitals and accents don't matter. If there are several matches (up to 10), the bot shows you buttons to choose; if there are too many, it asks for something more specific. The full name, likeAmerica/Guayaquil, also works. - If it doesn't find the city, try a large one nearby. The full list is on Wikipedia.
The time comes out in the format 31/10/2026 14:05. On Windows the tzdata package is needed, which comes in requirements.txt.
Auto-delete replies
In Settings → 🧹 Auto-delete (owner only) you choose to have your commands' replies delete themselves after 2 or 5 seconds, or turn it off (the default).
- The command's message is deleted when it finishes successfully: on your account it is the same one you edit with the result (for example,
.ban→ «Banned»). If the command fails it is not deleted, so you can read the error. - With sudo, your userbot's reply is deleted and, in groups (if you can delete messages), so is the sudo user's command.
- These are not deleted, because they show information or content you want to keep:
alive,help,info,id,gifts,dev,getdb,listdb,snip,snips,gbans,warns,approved(aprobados),listsudo,addons,install,mypacks,packinfo,stickerinfo,getsticker,kang,tiny,tostickerandtoimg. Addon commands aren't either, unless their author asks for it (see Plugins). - What the assistant bot writes (
/banand the rest) is not deleted.
Command prefix
In Settings → ⌨️ Prefix (owner only) you change the prefix you type your commands with, without touching the .env or restarting:
- ✏️ Change: the bot asks you for the new prefix. It can be a symbol or an emoji (
!,🔥,𑂅...), 1 to 3 characters and no spaces. It applies right away: the old one stops working. - ↩️ Use the .env one: goes back to the
.env'sPREFIX(default.). If you pick the same one as the.env, nothing separate is saved. - What you choose here wins over the
.env. If you get it wrong, the assistant bot doesn't use a prefix: go to Settings → ⌨️ Prefix and change it. - The prefix for people with sudo (
SUDO_PREFIX) does not change: it stays in the.env.
AFK
In Settings → 💤 AFK you choose the minimum number of seconds between one AFK mode reply and the next to the same person in the same chat. The minimum is 10 s (factory value), with no maximum, and it's up to you.
Alive
In ⚙️ Settings → 🟢 Alive you customize what .alive shows:
| Button | What it does |
|---|---|
| 📝 Text | Changes the text. It supports Telegram formatting and the variables below. ↩ Reset goes back to the default text |
| 🎞 Media | Adds a photo, video or GIF (normal, not as a file, maximum 20 MB) |
| 🗑 Delete media | Removes the media |
Text variables:
| Variable | Replaced by |
|---|---|
{uptime} |
Time on |
{python} |
Python version |
{kurigram} |
Kurigram version |
{db} |
The database you use and its version, for example PostgreSQL 17.5 |
{version} |
KitDev version |
{name}, {username} |
Your name and your username |
{time} |
The date and time in your time zone |
{e:alive}, {e:uptime}, {e:python}, {e:kurigram} |
Emojis. They are premium if your account has Telegram Premium; otherwise, the regular emoji. See Premium emojis |
The default text does not include {time}: add it yourself if you want to see the time. If you had already changed the text before {db} existed, add it too to see the database.
Stats
Shows a window with your name, username, ID, phone, whether you have Premium, the uptime, how many users have written to the bot, how many commands there are and the KitDev version.
Broadcast
Sends a message to everyone who has started the bot or written to it.
- Press 📻 Broadcast. The bot tells you how many people it would reach.
- Send it the message you want to broadcast (text, photo, etc.). You have 5 minutes.
- Confirm with ✅ Send, or cancel with ✖ Cancel.
- While it is sending you see the progress and a ⛔ Stop button. When it finishes, the summary says how many were sent, how many blocked the bot and how many failed.
There is only one broadcast at a time.
Changing its photo from Telegram
- In the
/startmenu, press 🖼 Change bot photo. - Send it the photo you want, as a normal photo (not as a file). You have 5 minutes. The ✖ Cancel button goes back to the menu.
- The bot replies
⏳ Procesando la foto...and then✅ Foto actualizada.The photo is applied by the userbot with BotFather, so KitDev must be on.
Photos for the random choice
Copy .png, .jpg or .jpeg files to assets/avatars/. Preferably square, 512×512 or larger and under 1 MB. KitDev picks one at random each time, both for the new bot and for .botfoto and the .help menu.
Using your own bot
Put its token in BOT_TOKEN (see the variables in the installation). For .help to use buttons, the bot must belong to your same account in BotFather (KitDev enables its inline mode automatically). If not, the menu is shown as plain text.
Limits
BotFather limits how many bots an account can create and may ask you to wait if many are created in a row, or if you change the photo many times in a row. If something fails, KitDev says so in the console, keeps working without the assistant and .help is shown as text.
The bot's token is saved in data/state.json, which is not uploaded to Git. If you have doubts about the assistant, see Troubleshooting.