Admin commands are restricted to users whose Telegram username is listed inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/AmiraliNotFound/dummy-gemini-bot/llms.txt
Use this file to discover all available pages before exploring further.
ALLOWED_ADMINS (configured in .env). These commands control runtime configuration, special user management, and direct user communication.
The bot checks the sender’s Telegram username against
ALLOWED_ADMINS (case-insensitive) before executing any admin command. Unauthorized users are silently rejected with a warning logged to the console. There is no public error message shown to unauthorized users. Note that /admin additionally requires a private (DM) chat; /reply has no such restriction./admin
Opens the admin WebApp dashboard and registers the admin’s chat ID for support ticket forwarding. When called without subcommands, it displays a full configuration overview including the current model ID, context window size, timeout, TTS settings, system instruction, and available subcommands.- Syntax:
/admin - Where: DMs only (the handler explicitly rejects non-private chats)
- Example:
- Notes:
- Requires
WEBAPP_URLto be set in.envfor the dashboard button to appear. IfWEBAPP_URLis not configured, the text configuration overview is still shown. - This command also registers the admin’s chat ID in the
admin_chatstable, enabling support ticket forwarding from/support.
- Requires
/admin set_model <model_id>
Changes the primary Gemini model ID used for all AI responses at runtime — no restart required.- Syntax:
/admin set_model <model_id> - Example:
- Effect: Updates
MODEL_IDinruntime_configand persists the change to the database immediately. All subsequent AI requests use the new model.
/admin set_limit <number>
Sets the conversation history context limit — the number of past messages fed to Gemini as context when generating a reply.- Syntax:
/admin set_limit <number> - Example:
- Effect: Updates
CONTEXT_LIMITinruntime_configand the database immediately. Must be a positive integer; non-numeric input is rejected with an error message.
/admin set_timeout <float>
Sets the AI response generation timeout in seconds. Requests that exceed this threshold are aborted and the bot falls back to its configured fallback models.- Syntax:
/admin set_timeout <float> - Example:
- Effect: Updates
TIMEOUTinruntime_configand the database immediately. Accepts both integer and decimal values; non-numeric input is rejected.
/admin set_chance <float>
Sets the probability that the bot will spontaneously roast a random message in a group chat, without being directly addressed.- Syntax:
/admin set_chance <float> - Example:
- Effect: Updates
RANDOM_ROAST_CHANCEinruntime_configand the database immediately. Accepts a decimal between0.0(never) and1.0(always); values outside this range are rejected.
/admin set_instruction <prompt>
Replaces the global system instruction (persona prompt) used for all AI responses at runtime.- Syntax:
/admin set_instruction <prompt text> - Example:
- Effect: Updates
SYSTEM_INSTRUCTIONinruntime_configand the database immediately. All subsequent AI requests use the new system prompt.
/admin add_special <@username> <instruction>
Adds or updates a VIP user with a custom system instruction. When that user sends a message, the bot uses their personal instruction instead of the global system prompt.- Syntax:
/admin add_special <@username> <instruction> - Example:
For names containing spaces, wrap the name in quotes:
- Effect: Inserts or updates a row in the
special_userstable with the username (leading@stripped) and the custom instruction.
/admin remove_special <@username>
Removes a VIP user and their custom instruction from the database.- Syntax:
/admin remove_special <@username> - Example:
- Effect: Deletes the matching row from the
special_userstable. The leading@is stripped automatically before the lookup.
/admin list_special
Lists all VIP users currently registered in the database along with their custom instructions.- Syntax:
/admin list_special - Example:
- Note: If no special users are registered, the bot responds with an informational message rather than an empty list.
/admin stats
Returns a brief statistics overview of the bot’s database, including total unique chats, total logged messages, and database file size.- Syntax:
/admin stats - Example:
- Effect: Queries
get_db_statsand replies with a formatted summary. No changes are made to any configuration.
/admin broadcast <message>
Sends a plain-text message to every chat ID stored in the database. Useful for announcing downtime or updates to all active users and groups.- Syntax:
/admin broadcast <message> - Example:
- Effect: Iterates all known chat IDs and sends the message text to each one with a short rate-limiting delay between sends. A summary of successful and failed deliveries is returned to the admin.
/reply <user_id> <message>
Sends a message directly to a user’s DM from the bot. Used by admins to respond to support tickets received via/support.
- Syntax:
/reply <user_id> <message> - Where: DMs and groups (admin-only; no private-chat restriction is enforced by the handler)
- Example:
- Notes:
user_idis the numeric Telegram user ID included in the forwarded support ticket message.- The message is delivered to the user with a
✉️ پاسخ مدیریتheader. - Passing a non-numeric
user_idor auser_idthat the bot cannot reach will return an error message to the admin.