This project is a Telegram Game Bot and forked from github.com/nikandr-surkov/Hamster-Kombat-Telegram-Mini-App-Clone
- The application tracks the user's level and points. There are ten levels, ranging from "Bronze" to "Lord," based on the number of coins (points). As the user's points increase, they advance through the levels.
- The application includes countdown timers for three daily events: "Daily Reward," "Daily Cipher," and "Daily Combo." These timers reset daily at specific times.
- The application simulates profit accumulation per hour, updating the user's points every second based on a predefined profit rate.
- The application features clickable cards that animate and add points when clicked. A floating animation is displayed at the click location, showing the points added.
- The UI is designed to be responsive, with different sections of the screen dedicated to various game functions.
- React
- Tailwind CSS
- Telegram (Telegram Bot API)
- Node.js (express npm, node-telegram-bot-api npm)
- Clone the repository
- Install dependencies with
npm install
- Start the React app with
npm run dev
- Create a Telegram bot and game using BotFather. If you need guidance, refer to this Telegram game bot creating guide. Add your bot token to a
./bot/.env
file or modify the ./bot/bot.js file directly:BOT_TOKEN=your_bot_token_here
- To test the game locally, install and sign in to ngrok. Obtain an authtoken from ngrok, then use it with the command
ngrok config add-authtoken $YOUR_AUTHTOKEN
. Afterward, runngrok http $YOUR_PORT
to get a public URL for your Telegram game bot. Copy the link and update theurl
variable in the ./bot/bot.js file - In the ./bot folder, first run
npm install
, then executenode bot.js
- Open Telegram, search for your bot by name or use the game link provided by BotFather. Start a chat with the bot and type
/start
to see and play the game.