BOMJ COIN is a Telegram bot developed as a demonstration of the capabilities of the TON blockchain. The project was created by low digital and quickly gained popularity due to its engaging gameplay and virtual coin earning opportunities.
You can check out the game right now on Telegram: https://t.me/bmjcoinbot
BOMJ COIN is an interactive game where users can earn virtual coins, enhance their skills, and compete with other players. The bot offers several game modes, including mini-games and an upgrade system.
- PHP 7.4 or higher
- MySQL 5.7 or higher
- Telegram Bot API Token
-
Clone the repository:
git clone https://github.com/lowdigital/crypto-clicker-miniapp.git cd crypto-clicker-miniapp
-
Set up the database:
- Create a MySQL database
-
Configure the connection:
-
Open the
_dbconnect.php
file and enter your database connection details:<?php $tg_token = "YOUR_TELEGRAM_BOT_TOKEN"; $dbhost = 'localhost'; $dbuser = 'YOUR_DB_USER'; $dbpassword = 'YOUR_DB_PASSWORD'; $dbname = 'YOUR_DB_NAME'; $link = mysqli_connect($dbhost, $dbuser, $dbpassword, $dbname); if (!$link) exit; mysqli_query($link, "SET NAMES 'utf8mb4'"); ?>
-
-
Set up the Telegram webhook:
-
Set the webhook for your bot:
curl -F "url=https://yourdomain.com/path/to/webhook.php" https://api.telegram.org/botYOUR_TELEGRAM_BOT_TOKEN/setWebhook
-
-
Deploy the project:
- Deploy the project on your web server.
- Ensure your web server is configured to handle PHP scripts and is accessible from the internet to receive webhooks from Telegram.
-
UI KIT Setup:
- Purchase and download the UI KIT from AppKit Mobile UI KIT.
- Extract all directories from the "code" folder in the UI KIT archive into the "core" directory of your project.
-
Set Up CRON Jobs:
To ensure the application runs smoothly and its background tasks are executed timely, you need to set up the following CRON jobs:
-
Autopilot Script (
/cron/autopilot.php
):- Frequency: Every hour
- CRON Expression:
0 * * * * /usr/bin/php /path/to/your/project/cron/autopilot.php
-
Avatar Update Script (
/cron/avatar.php
):- Frequency: Every minute
- CRON Expression:
* * * * * /usr/bin/php /path/to/your/project/cron/avatar.php
-
Daily Script (
/cron/index.php
):- Frequency: At midnight every day
- CRON Expression:
0 0 * * * /usr/bin/php /path/to/your/project/cron/index.php
Steps to Set Up CRON Jobs:
-
Open your CRON job configuration file:
crontab -e
-
Add the above CRON expressions to the file, replacing
/path/to/your/project
with the actual path to your project directory. -
Save and exit the editor.
These CRON jobs will now execute the specified scripts at their respective intervals.
-
Start interacting with the bot by sending the /start
command in Telegram.
Enjoy managing your BOMJ COIN and climbing the leaderboards!
webhook.php
— Main file for handling incoming messages from Telegram._dbconnect.php
— Database connection file._boosters.php
— File containing information about available boosters.app.js
— Main JavaScript file for the frontend.api/
— Directory with API endpoints for various bot actions.
- Project Author: low digital
This project is licensed under the MIT License. See the LICENSE file for details.
- Follow updates on the Telegram channel: low digital.