Spaces:
Sleeping
Sleeping
File size: 2,756 Bytes
b107006 21011e9 64562e1 21011e9 64562e1 21011e9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | ---
title: Telegram Auction Bot
emoji: π΄
colorFrom: pink
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
---
# π΄ Telegram Auction Bot
A fun real-time bidding/auction bot for Telegram groups featuring Bollywood actresses!
## β¨ Features
- Dynamic number of players (configured by admin, default 1) type `bid start` to launch a session
- Each player gets **500 coins** session allowance to spend
- **5 actresses** auctioned per session (shuffled randomly)
- **15-second reset timer** β any new bid resets the clock (auction-house style!)
- Persistent leaderboard & player stats
- Admins can add custom actresses via bot commands
## π Setup
### 1. Create your bot
1. Open Telegram and message **@BotFather**
2. Send `/newbot` and follow the prompts
3. Copy the **API token** you receive
### 2. Install dependencies
```bash
npm install
```
### 3. Configure environment
```bash
cp .env.example .env
```
Edit `.env`:
```
BOT_TOKEN=your_token_from_botfather
ADMIN_IDS=your_telegram_user_id
```
> To find your Telegram user ID, message **@userinfobot** on Telegram.
### 4. Run the bot
```bash
node index.js
```
### 5. Add bot to your group
- Add the bot to your Telegram group
- Give it permission to send messages
- Make sure **Group Privacy** is disabled (ask BotFather: `/setprivacy` β Disable) so the bot can read messages
---
## π¬ Commands
| Command | Who | Description |
|---|---|---|
| `bid start` | Everyone | Join / start a session |
| `150` (any number) | Participants | Place a bid |
| `/leaderboard` | Everyone | All-time top players |
| `/mystats` | Everyone | Your personal stats |
| `/listactresses` | Everyone | View all actresses |
| `/how` | Everyone | Simple guide on how to play |
| `/help` | Everyone | Show help |
| `/addactress` | Admin | Instructions to add an actress |
| `/submitactress ...` | Admin | Submit a new actress |
| `/cancelsession` | Admin | Cancel the current session |
| `/helpadmin` | Admin | Show admin help |
---
## π Coin System
- Each session: **500 coins** allowance per player
- Coins are tracked lifetime in the leaderboard and profile stats
- Bids are deducted from session allowance first, then from the player's global wallet.
---
## ποΈ File Structure
```
telegram-bid-bot/
βββ index.js # Main bot logic
βββ characters.js # Default hardcoded actresses list
βββ db.js # JSON database helpers
βββ db.json # Auto-created on first run (persistent data)
βββ .env # Your bot token & admin IDs
βββ README.md
```
---
## π Running 24/7
To keep the bot running permanently, use **PM2**:
```bash
npm install -g pm2
pm2 start index.js --name auction-bot
pm2 save
pm2 startup
```
|