@bakachoda/casino-bot
v1.1.0
Published
Telegram bot that sends random animated dice emojis
Maintainers
Readme
🎰 Casino Bot
A fun and interactive Telegram bot built with Node.js that leverages Telegram's native animated dice emojis to bring casino-style mini-games directly to your chats!
✨ Features
- Quick Play: Instantly roll a dice, throw a dart, shoot hoops, kick a football, bowl, or spin the slot machine.
- Prediction Game Mode: Start a group prediction round where friends can bet on the outcome before rolling!
- Native Telegram Animations: Uses Telegram's built-in animated emojis for smooth, server-side verified random results.
- Easy to Use: Simple commands for everything.
🎮 Available Games
| Command | Game | Range | Description |
| :--- | :--- | :--- | :--- |
| /dice | 🎲 Dice | 1-6 | Roll a classic 6-sided dice |
| /darts | 🎯 Darts | 1-6 | Throw a dart at the dartboard |
| /basketball | 🏀 Basketball | 1-5 | Try to score a basket |
| /football | ⚽ Football | 1-5 | Kick the ball into the goal |
| /bowling | 🎳 Bowling | 1-6 | Try to get a strike |
| /slots | 🎰 Slots | 1-64 | Spin the slot machine for a jackpot |
🚀 Getting Started
Prerequisites
- Node.js (v14 or higher)
- A Telegram Bot Token (Get one from @BotFather)
Installation
- Install the package globally:
npm install -g @bakachoda/casino-bot - Or clone the repository and install dependencies:
git clone <your-repo-url> cd casino-bot npm install
Configuration
Create a .env file in the root of your project and add your Telegram Bot Token:
BOT_TOKEN=your_telegram_bot_token_here(Note: If running globally via npx, you can set the environment variable directly or modify the token inside bot.js as a fallback)
Running the Bot
If installed globally:
casino-botIf running locally:
npm start🎲 How to Play the Prediction Game
Start a betting round with your friends in a group chat!
- Start a round:
/predict <game>(e.g.,/predict dice) - Place your bets: Players use
/join <number>to predict the outcome. - Check players: Use
/playersto see everyone's predictions. - Roll: Use
/rollto fire the animation and see who wins! - Cancel: Made a mistake? Cancel the round with
/cancel.
🛠 Built With
- node-telegram-bot-api - Telegram Bot API wrapper for Node.js
- dotenv - Zero-dependency module that loads environment variables
📜 License
ISC
