No description
  • TypeScript 100%
Find a file
2026-02-03 19:55:06 +02:00
.gitea/workflows Remove setup-node step (already installed on runner) 2026-01-21 16:25:57 -05:00
.serena Refactor into modular architecture and add test suite 2026-01-21 23:16:54 +02:00
assets Add Gladiator Telegram bot with menu system and DM privacy 2026-01-21 23:16:54 +02:00
docs Add architecture design document for refactoring 2026-01-21 23:16:54 +02:00
src Apply code review fixes: validation, error handling, and cleanup 2026-02-03 12:52:03 -05:00
tests Add active vs total member tracking with soft-delete 2026-01-21 18:38:47 -05:00
.env.example Add automatic cleanup of old rate limit violations on startup 2026-02-03 12:43:53 -05:00
.gitignore Refactor to modular architecture with layered design 2026-01-21 23:16:54 +02:00
CLAUDE.md Add command rate limiting via @grammyjs/ratelimiter 2026-02-03 12:38:48 -05:00
package-lock.json Add command rate limiting via @grammyjs/ratelimiter 2026-02-03 12:38:48 -05:00
package.json Add command rate limiting via @grammyjs/ratelimiter 2026-02-03 12:38:48 -05:00
README.md Add Gladiator Telegram bot with menu system and DM privacy 2026-01-21 23:16:54 +02:00
tsconfig.json Add Gladiator Telegram bot with menu system and DM privacy 2026-01-21 23:16:54 +02:00
vitest.config.ts Refactor into modular architecture and add test suite 2026-01-21 23:16:54 +02:00

Gladiator Telegram Bot

A Telegram bot built with TypeScript and the Grammy framework.

Features

  • Custom commands with gladiator-themed responses
  • Status and information commands
  • Built with TypeScript for type safety
  • Easy to extend and customize

Prerequisites

  • Node.js (v18 or higher recommended)
  • A Telegram Bot Token from @BotFather

Setup

  1. Clone the repository and install dependencies:
npm install
  1. Create a .env file from the example:
cp .env.example .env
  1. Get your bot token:

    • Open Telegram and search for @BotFather
    • Send /newbot command
    • Follow the prompts to create your bot
    • Copy the token provided
  2. Add your bot token to the .env file:

BOT_TOKEN=your_bot_token_here

Development

Run the bot in development mode with hot reload:

npm run dev

Building

Compile TypeScript to JavaScript:

npm run build

Production

Run the compiled bot:

npm start

Available Commands

  • /start - Show welcome message and available commands
  • /help - Get help information
  • /status - Check bot status and uptime
  • /info - Get bot information
  • /gladiator - Get a random gladiator quote

Project Structure

gladiator_telegram_bot/
├── src/
│   └── index.ts          # Main bot code
├── dist/                 # Compiled JavaScript (generated)
├── .env                  # Environment variables (not committed)
├── .env.example          # Example environment file
├── .gitignore           # Git ignore rules
├── package.json         # Project dependencies
├── tsconfig.json        # TypeScript configuration
└── README.md            # This file

Adding New Commands

To add a new command, edit src/index.ts and add:

bot.command("yourcommand", (ctx) => {
  ctx.reply("Your response here");
});

Learn More

License

ISC