Nova
Modular telegram userbot written on golang with gogram
Install / Use
/learn @IndrajeethY/NovaREADME
NovaUserbot

NovaUserbot is a powerful and flexible userbot written in Go. It leverages the Telegram API to automate tasks and enhance your Telegram experience.
Features
- 🤖 Easy to set up and use
- 🚀 High performance with Go
- 🔒 Secure and reliable
- 📚 Built using the Gogram library
- 🗄️ Uses Redis for fast database management
- 🌐 Multi-language support (English, Hindi)
- 🔧 Configurable via database variables
- 👥 Multi-user support with sudo system
Requirements
- Go 1.23 or higher
- Redis database
- Telegram API credentials
Quick Start
1. Get Telegram API Credentials
- Go to https://my.telegram.org
- Log in with your phone number
- Go to "API development tools"
- Create a new application
- Copy your
API_IDandAPI_HASH
2. Generate String Session
You have two options to generate a string session:
Option A: Online Generator (Recommended)
Visit https://sess.gogram.fun/ and follow the instructions.
Option B: Local Generator
cd scripts
go mod init session_gen
go mod tidy
go run session_gen.go
3. Get a Bot Token
- Message @BotFather on Telegram
- Send
/newbotand follow the instructions - Copy your bot token
4. Set Up Redis
You can use a free Redis instance from:
- Redis Cloud
- Upstash
- Or run locally:
docker run -d -p 6379:6379 redis
Deployment Options
🐳 Docker Deployment (Recommended)
Using Docker Compose
- Clone the repository:
git clone https://github.com/IndrajeethY/Nova.git
cd NovaUserbot
- Create a
.envfile:
cp .env.example .env
# Edit .env with your credentials
- Start with Docker Compose:
docker-compose up -d
- View logs:
docker-compose logs -f
- Stop the bot:
docker-compose down
Using Docker directly
- Build the image:
docker build -t novauserbot .
- Run the container:
docker run -d \
--name novauserbot \
-e API_ID=your_api_id \
-e API_HASH=your_api_hash \
-e TOKEN=your_bot_token \
-e STRING_SESSION=your_string_session \
-e DB_URL=redis://username:password@host:port \
--restart unless-stopped \
novauserbot
💻 Local Deployment
Prerequisites
- Go 1.23 or higher installed
- Git installed
- Redis running locally or accessible remotely
Steps
- Clone the repository:
git clone https://github.com/IndrajeethY/Nova.git
cd NovaUserbot
- Install dependencies:
go mod tidy
- Set up environment variables:
Linux/macOS:
export API_ID=your_api_id
export API_HASH=your_api_hash
export TOKEN=your_bot_token
export STRING_SESSION=your_string_session
export DB_URL=redis://localhost:6379
Windows (PowerShell):
$env:API_ID="your_api_id"
$env:API_HASH="your_api_hash"
$env:TOKEN="your_bot_token"
$env:STRING_SESSION="your_string_session"
$env:DB_URL="redis://localhost:6379"
Or create a .env file:
API_ID=your_api_id
API_HASH=your_api_hash
TOKEN=your_bot_token
STRING_SESSION=your_string_session
DB_URL=redis://localhost:6379
- Run the bot:
go run .
- Or build and run:
go build -o novauserbot
./novauserbot
☁️ Cloud Deployment
Heroku
- Create a new Heroku app
- Add Redis addon:
heroku addons:create heroku-redis:hobby-dev - Set config vars:
heroku config:set API_ID=your_api_id
heroku config:set API_HASH=your_api_hash
heroku config:set TOKEN=your_bot_token
heroku config:set STRING_SESSION=your_string_session
- Deploy:
git push heroku main
Railway
- Fork this repository
- Create a new project on Railway
- Connect your GitHub repo
- Add environment variables
- Deploy!
Environment Variables
| Variable | Required | Description | Example |
|----------|----------|-------------|---------|
| API_ID | ✅ | Telegram API ID | 123456 |
| API_HASH | ✅ | Telegram API Hash | abcdef1234567890 |
| TOKEN | ✅ | Bot token from BotFather | 123456:ABC-DEF |
| STRING_SESSION | ✅ | String session for userbot | 1BvXWG... |
| DB_URL | ✅ | Redis connection URL | redis://user:pass@host:port |
Database Variables
You can configure these variables using .setvar command:
| Variable | Description | Default |
|----------|-------------|---------|
| CMD_HANDLER | Command prefix | . |
| ALIVE_IMAGE | Custom alive image URL | - |
| LOG_CHAT | Chat ID for logging | - |
| BOT_LANGUAGE | Bot language (en/hi) | en |
| GIT_TOKEN | GitHub token for updates | - |
| UPSTREAM_REPO | Upstream repo URL | Default repo |
| UPSTREAM_BRANCH | Upstream branch | main |
| GEMINI_API_KEY | Google Gemini API key | - |
| PM_AI_PROMT | Custom PM assistant prompt | - |
Google Drive Setup
To use the Google Drive module, follow these steps:
1. Create a Google Cloud Project
- Go to Google Cloud Console
- Click on "Select a project" → "New Project"
- Enter a project name and click "Create"
2. Enable Google Drive API
- In your project dashboard, go to "APIs & Services" → "Library"
- Search for "Google Drive API"
- Click on it and press "Enable"
3. Create OAuth 2.0 Credentials
- Go to "APIs & Services" → "Credentials"
- Click "Create Credentials" → "OAuth client ID"
- If prompted, configure the OAuth consent screen:
- Choose "External" user type
- Fill in the required fields (App name, User support email, Developer email)
- Add scope:
https://www.googleapis.com/auth/drive - Add your email as a test user
- Create OAuth client ID:
- Application type: "Desktop app"
- Name: "NovaUserbot" (or any name)
- Click "Create"
- Copy your Client ID and Client Secret
4. Configure in Userbot
-
Send this command to set up credentials:
.gsetup <client_id> <client_secret> -
You'll receive an authorization URL. Open it in your browser.
-
Sign in with your Google account and authorize the app.
-
Copy the authorization code and use:
.gauth <authorization_code> -
Done! You can now use Google Drive commands.
Google Drive Commands
| Command | Description |
|---------|-------------|
| .gsetup <client_id> <client_secret> | Setup Google Drive credentials |
| .gauth <code> | Complete authorization with auth code |
| .gupload | Upload replied file to Google Drive |
| .glist | List files in your Drive |
| .gsearch <query> | Search files in Drive |
| .gdown <file_id/link> | Download file from Drive |
| .gdelete <file_id/link> | Delete file from Drive |
Commands
Core
| Command | Description |
|---------|-------------|
| .help | Show help menu or search modules/commands |
| .ping | Ping the userbot |
| .dcping | Ping all data centers |
| .alive | Check if bot is running |
Admin
| Command | Description |
|---------|-------------|
| .ban | Ban a user from the chat |
| .unban | Unban a user from the chat |
| .kick | Kick a user from the chat |
| .mute | Mute a user in the chat |
| .unmute | Unmute a user in the chat |
| .dmute | Delete message and mute a user |
| .dkick | Delete message and kick a user |
| .dban | Delete message and ban a user |
| .promote | Promote a user to admin |
| .fullpromote | Fully promote a user with all rights |
| .demote | Demote a user from admin |
| .pin | Pin a message in the chat |
| .unpin | Unpin a message |
| .zombies | Find and clean deleted accounts |
BanGuard
| Command | Description |
|---------|-------------|
| .gconfig <duration> <limit> | Set BanGuard limits (e.g., .gconfig 10s 5) |
| .gtoggle on/off | Toggle BanGuard on/off |
| .gstatus | Check BanGuard status |
Gban
| Command | Description |
|---------|-------------|
| .gban | Globally ban a user |
| .ungban | Globally unban a user |
| .gbanned | List globally banned users |
| .antispam | Toggle antispam |
Sudoers
| Command | Description |
|---------|-------------|
| .addsudo | Add user as sudo |
| .delsudo | Remove user from sudo |
| .listsudo | List all sudos |
PM Permit
| Command | Description |
|---------|-------------|
| .ap | Approve a user |
| .dap | Disapprove a user |
| .approved | List approved users |
| .setprompt | Set PM assistant prompt |
AFK
| Command | Description |
|---------|-------------|
| .afk [reason] | Set AFK status (supports media reply) |
| .brb [reason] | Alias for .afk |
Database
| Command | Description |
|---------|-------------|
| .setvar <key> <value> | Set a database variable |
| .getvar <key> | Get a database variable |
| .delvar <key> | Delete a database variable |
| .vars | List all database variables |
| .delallvars | Delete all variables (requires confirm) |
Files
| Command | Description |
|---------|-------------|
| .file <file_id> | Send a file by its FileID |
| .fid | Get FileID of replied media |
| .ul | Upload a file (-s for spoiler, --doc for document) |
| .dl | Download replied file or from link |
| .cancel | Cancel an active download |
| .finfo | Get file information |
File Sharing
| Command | Description |
|---------|-------------|
| .share [service] | Share to hosting (catbox/gofile/fileio/0x0) |
| .catbox | Upload to Catbox.moe |
| .gofile | Upload to GoFile.io |
| .fileio | Upload to File.io (one-time download) |
| .genlink | Generate link for media |
Google Drive
| Command | Description |
|---------|-------------|
| .gsetup <client_id> <client_secret> | Setup Google Drive credentials |
| .gauth <code> | Complete authorization with auth code |
| .gupload | Upload replied file to Google Drive |
| .glist | List files in Google Drive |
| .gsearch <query> | Search files in Google Dr
