A Telegram bot that allows users to collect, manage, and interact with Pokemon. Built with TypeScript, Node.js, and MongoDB.
-
Pokemon Management
- Generate random Pokemon with unique stats
- View Pokemon details (HP, Attack, Defense, Speed)
- Navigate through Pokemon collection
- Add/Remove Pokemon to favorites
-
Scene Management
- Home scene with main navigation
- Pokemon scene for Pokemon-related actions
- Settings scene for bot configuration
-
User System
- User session management
- Persistent user preferences
- Favorite Pokemon tracking
- TypeScript
- Node.js
- MongoDB (with Prisma ORM)
- Telegram Bot API
- Zod (for validation)
- Faker.js (for generating mock data)
node >= 18.0.0
npm >= 9.0.0
MongoDB instance
- Clone the repository:
git clone <repository-url>
cd telegram-pokemon-bot
- Install dependencies:
npm install
- Set up environment variables:
cp .env.example .env
Add your configuration:
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
DATABASE_URL=your_mongodb_connection_string
- Generate Prisma client:
npx prisma generate
- Start the bot:
npm run dev # Development mode
npm start # Production mode
src/
├── db/ # Database operations
├── enums/ # Enumerations
├── interfaces/ # TypeScript interfaces
├── modules/ # Core modules
├── scenes/ # Scene implementations
└── types/ # Type definitions
/start
- Initialize the bot🏠 Home
- Return to home screen🍑 Pokemon
- Access Pokemon features⚙️ Settings
- Access bot settings
Run tests:
npm run test
Check types and lint:
npm run check
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.