- Play the Wordle-inspired word guessing game in private chats or group chats.
- Supports multiplayer gameplay in groups, with admin tools for game management.
- Keep track of scores with group and global leaderboards.
- Commands to view personal scores and leaderboard rankings filtered by time (today, week, month, etc.).
- Flexible game settings: customizable limits for attempts and group admin permissions.
- Start a game: Use the
/new
command in a group or private chat. - Guess the word: Players try to guess a random 5-letter word.
- Hints after each guess:
- 🟩 - Correct letter in the right spot.
- 🟨 - Correct letter in the wrong spot.
- 🟥 - Letter not in the word.
- The game ends when:
- The word is correctly guessed, or
- Maximum number of guesses (30) is reached.
- The first person to guess the word correctly wins!
- /new - Start a new game.
- /end - End the current game (admins only in group chats).
- /help - Get help with commands and game rules.
- /leaderboard - View leaderboards for the group or globally. Example:
/leaderboard global week
- /myscore - View your score. Example:
/myscore group all
- /stats - View bot usage stats (admin users only).
- Bun.js Runtime (or Node.js)
- Telegram Bot Token (create one via BotFather)
- PostgreSQL database
- Redis server (for caching and session management)
-
Clone the repository:
git clone https://github.com/binamralamsal/WordSeek cd WordSeek
-
Install dependencies:
bun install
-
Configure environment variables: Create a
.env
file in the root directory with the following variables:BOT_TOKEN=your-telegram-bot-token DATABASE_URI=your-postgresql-database-url NODE_ENV=development REDIS_URI=redis://127.0.0.1:6379
-
Set up the database: Run the database migrations to set up the required tables:
bun run migrate
-
Start the bot:
- Development mode (with hot reload):
bun run dev
- Production mode:
bun run start
- Development mode (with hot reload):
- Generate new migrations (after schema changes):
bun run generate
- Open database studio (for database management):
bun run studio
Variable | Description | Example |
---|---|---|
BOT_TOKEN |
Your Telegram bot token from BotFather | 123456789:ABCdefGHIjklMNOpqrsTUVwxyz |
DATABASE_URI |
PostgreSQL connection string | postgresql://user:password@localhost:5432/wordseek |
NODE_ENV |
Environment mode | development or production |
REDIS_URI |
Redis connection string | redis://127.0.0.1:6379 |
- grammy: Telegram Bot API framework.
- Drizzle ORM: Simplified database queries and migrations.
- PostgreSQL: Persistent storage for game data and leaderboards.
- Redis: Caching and session management.
- Bun.js: Blazing fast JavaScript runtime and package manager.
- Zod: Schema validation and type safety.
- WordSeek I (Main bot)
- WordSeek II (Use this if the main bot is busy)
- Join the Official Group: Word Guesser Group - Play the game, discuss strategies, and share feedback.
- Support the Developer: Binamra Bots Channel
- Contact the Developer: Have suggestions or issues? Reach out on Telegram: @binamralamsal
We welcome contributions to enhance the bot! Here's how you can help:
- Fork the repository on GitHub.
- Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-name
- Make your changes and ensure they follow the project's coding standards.
- Test your changes thoroughly in development mode.
- Commit your changes with descriptive commit messages:
git commit -m "Add: new feature description"
- Push to your fork and open a pull request with a clear description of your changes.
- Follow the existing code style and structure.
- Add appropriate error handling for new features.
- Update documentation for any new commands or features.
- Test both private chat and group chat functionality.
- Database connection errors: Ensure PostgreSQL is running and the
DATABASE_URI
is correct. - Redis connection errors: Make sure Redis server is running on the specified port.
- Bot not responding: Verify your
BOT_TOKEN
is valid and the bot is not already running elsewhere. - Migration errors: Ensure you have proper database permissions and the database exists.
If you encounter issues:
- Check the Issues page on GitHub.
- Join the Word Guesser Group for community support.
- Contact the developer directly: @binamralamsal
This project is licensed under the MIT License. See the LICENSE file for more details.