Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.env
node_modules
postgres_data
postgres_data
package-lock.json
64 changes: 62 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,63 @@
# Ability Telegram
# Ability Telegram Bot 🎯

adoro le abilità
A Telegram bot that helps you track abilities and points for users in your group.

## Features

- Track multiple abilities per group
- Award and remove points to/from users
- View leaderboards for each ability
- Admin-only ability management
- Inline button support for quick point adjustments

## Commands

- `/start` - Get a welcome message
- `/help` - Show all available commands
- `/info` - Get your user ID and chat ID
- `/create [ability]` - Create a new ability (admins only)
- `/remove [ability]` - Remove an ability (admins only)
- `/list` - List all abilities with pagination
- `/add [ability]` - Add a point to the replied user (reply to their message)
- `/leaderboard [ability]` - Show leaderboard for an ability

## Setup

### Environment Variables

Create a `.env` file with the following variables:

```
DATABASE_URL=postgresql://user:password@host:port/database
TOKEN=your_telegram_bot_token
```

### Using Docker

```bash
docker-compose up -d
```

### Running Migrations

```bash
npm run migrate up
```

### Starting the Bot

```bash
npm start
```

## Usage

1. Add the bot to your Telegram group
2. Admins can create abilities using `/create [ability name]`
3. Reply to a user's message and use `/add [ability name]` to award points
4. Use `/leaderboard [ability name]` to view rankings
5. Click the ➕/➖ buttons on point messages to adjust points

## License

This project is provided as-is without any specific license.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"postgres": "^3.4.7"
},
"devDependencies": {
"node-pg-migrate": "^8.0.3"
"@types/node": "^24.9.2",
"node-pg-migrate": "^8.0.3",
"typescript": "^5.9.3"
}
}
Loading