No description
- TypeScript 100%
|
|
||
|---|---|---|
| .gitea/workflows | ||
| .serena | ||
| assets | ||
| docs | ||
| src | ||
| tests | ||
| .env.example | ||
| .gitignore | ||
| CLAUDE.md | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| vitest.config.ts | ||
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
- Clone the repository and install dependencies:
npm install
- Create a
.envfile from the example:
cp .env.example .env
-
Get your bot token:
- Open Telegram and search for @BotFather
- Send
/newbotcommand - Follow the prompts to create your bot
- Copy the token provided
-
Add your bot token to the
.envfile:
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