MachinimaBot is a Telegram bot written in PHP. It is designed to interact with users on Telegram, providing various functionalities based on the commands it receives.
Screenshot of the admin panel showing the management capabilities of the Telegram bot.
- Real-time interaction with users on Telegram.
- Easy configuration using environment variables.
- Can work in Webhook mode or in a loop to get updates continuously.
- Various commands for managing machinimators.
- PHP 7.4 or higher
- Composer for dependency management
-
Clone the repository:
git clone https://github.com/ChernegaSergiy/machinima-bot.git cd machinima-bot -
Install dependencies using Composer:
composer install
-
Copy the
.env.examplefile to.envand set your Telegram bot token:cp .env.example .env
Edit the
.envfile to include yourBOT_TOKEN.
Run the bot:
php bot.phpIf you want the bot to work on Webhook, uncomment the Webhook section in bot.php:
// $update = json_decode(file_get_contents("php://input"), true);
// if ($update) {
// $bot->handleUpdate($update);
// }The following screenshot shows the initialization process of the MORF Editorial System, which serves as the backbone of MachinimaBot. It verifies the configuration, environment variables, and initializes the bot core before entering the main loop.
This repository includes a .gitignore file to exclude sensitive files like .env:
# .gitignore
.env
Contributions are welcome and appreciated! Here's how you can contribute:
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Please make sure to update tests as appropriate and adhere to the existing coding style.
This project is licensed under the CSSM Unlimited License v2.0 (CSSM-ULv2). See the LICENSE file for details.
