Installation

Installation

Caution

Don’t install the userbot on recently registered accounts

Environment Variables

VariableImportanceDescriptionSource / LinkDefault value
API_IDRequiredYour Telegram API ID.my.telegram.org2040
API_HASHRequiredYour Telegram API Hash.my.telegram.orgb18441a1ff607e10a989891a5462e627
STRINGSESSIONRequired*Pyrogram session string. Necessary for Docker/Cloud.Use Script OR Run on Repl.it
DATABASE_TYPERequiredSet to sqlite3 or mongodb.
DATABASE_NAMERequiredFile name for sqlite3 (e.g., db.sqlite3) or Mongo DB name.
DATABASE_URLOptionalYour MongoDB connection URL (only if using Mongo).MongoDB Atlas
PM_LIMITOptionalNumber of warnings before Anti-PM kicks in.4
MODULES_REPO_BRANCHOptionalDefault custom modules repo branch-main
SECOND_SESSIONOptionalSession string for the Music Bot feature.
GEMINI_KEYPluginAPI Key for Gemini AI features.Google AI Studio
APIFLASH_KEYPluginAPI Key for taking web screenshots.ApiFlash
RMBG_KEYPluginAPI Key for the removebg background remover.remove.bg
VT_KEYPluginAPI Key for the VirusTotal file scanner.VirusTotal
COHERE_KEYPluginAPI Key for Cohere AI features.Cohere Dashboard

Quick Notes

  • Database: If you are using sqlite3, you can leave DATABASE_URL blank.
  • Sessions: If STRINGSESSION is 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.