A powerful and efficient PHP bot that monitors AG-SA player status and delivers real-time notifications through Bale messenger. Perfect for gaming communities who want to track player statuses automatically.
- ๐ Real-time status monitoring
- ๐ Instant notifications on status changes
- ๐ Status image visualization
- ๐ฅ Multi-user subscription system
- ๐ก๏ธ Robust error handling
- ๐ Detailed logging system
- PHP 7.4 or higher
- cPanel hosting or any PHP web hosting
- GD Library enabled in PHP
- Bale Bot Token (get from @BotFather on Bale)
- Clone the repository
git clone https://github.com/yourusername/agsa-status-bot.git- Upload files to your web hosting
โโโ config.php
โโโ functions.php
โโโ webhook.php
โโโ check_status.php
โโโ README.md
- Create necessary files with proper permissions
touch subscribers.json last_status.txt bot_log.txt
chmod 666 subscribers.json last_status.txt bot_log.txt- Configure your bot
- Edit
config.phpwith your settings:
define('BOT_TOKEN', 'YOUR_BALE_BOT_TOKEN');
define('ACCOUNT_NAME', 'YOUR_ACCOUNT_NAME');- Set up webhook
https://api.bale.ai/bot{BOT_TOKEN}/setWebhook?url=https://your-domain.com/path-to/webhook.php
- Add cron job in cPanel
* * * * * php /home/username/public_html/path-to/check_status.php/start- Subscribe to status updates/stop- Unsubscribe from updates/status- Check current status/help- Show help message
- ๐ข Online
- ๐ Sleep
- ๐ด Offline
The bot uses:
- PHP GD library for image processing
- Bale.ai Bot API for messaging
- File-based storage for subscribers and status
- Cron job for automated monitoring
The bot maintains detailed logs in bot_log.txt:
- Status checks
- API responses
- Subscriber management
- Error tracking
- Fork the repository
- 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
This project is licensed under the MIT License - see the LICENSE file for details.
- Special thanks to Ramtin for the original concept
- AG-SA community for inspiration
- Bale messenger platform for the API
If you have any questions or need help, feel free to:
- Open an issue
- Contact via Telegram
- Email: themixtrus@gmail.com
Made with โค๏ธ for the AG-SA Community