Installation
Installation
Caution
Don’t install the userbot on recently registered accounts
Environment Variables
| Variable | Importance | Description | Source / Link | Default value |
|---|---|---|---|---|
API_ID | Required | Your Telegram API ID. | my.telegram.org | 2040 |
API_HASH | Required | Your Telegram API Hash. | my.telegram.org | b18441a1ff607e10a989891a5462e627 |
STRINGSESSION | Required* | Pyrogram session string. Necessary for Docker/Cloud. | Use Script OR | — |
DATABASE_TYPE | Required | Set to sqlite3 or mongodb. | — | — |
DATABASE_NAME | Required | File name for sqlite3 (e.g., db.sqlite3) or Mongo DB name. | — | — |
DATABASE_URL | Optional | Your MongoDB connection URL (only if using Mongo). | MongoDB Atlas | — |
PM_LIMIT | Optional | Number of warnings before Anti-PM kicks in. | — | 4 |
MODULES_REPO_BRANCH | Optional | Default custom modules repo branch | - | main |
SECOND_SESSION | Optional | Session string for the Music Bot feature. | — | — |
GEMINI_KEY | Plugin | API Key for Gemini AI features. | Google AI Studio | — |
APIFLASH_KEY | Plugin | API Key for taking web screenshots. | ApiFlash | — |
RMBG_KEY | Plugin | API Key for the removebg background remover. | remove.bg | — |
VT_KEY | Plugin | API Key for the VirusTotal file scanner. | VirusTotal | — |
COHERE_KEY | Plugin | API Key for Cohere AI features. | Cohere Dashboard | — |
Quick Notes
- Database: If you are using
sqlite3, you can leaveDATABASE_URLblank. - Sessions: If
STRINGSESSIONis not provided, the bot will attempt to generate one at startup via the terminal, but this is not recommended for headless environments like Heroku or Docker.