As of 2024-08-01, the license for Telegram-Bot has been updated from GNU General Public License Version 3 (GPLv3) to GNU Affero General Public License Version 3 (AGPLv3).
This change ensures that any use of the software over a network must also provide the corresponding source code, in line with our commitment to software freedom.
We have deleted Searchable Bots and Contribute 3.0 Bots, and we will not provide any support for them.
Contribute 2.0 Codes are still available, but we will not provide any support for them.
It will soon be transfer to other open source enthusiasts.
We always make our codes open source, and we do not earn any money from them.
It is hard to maintain the codes, and we have to pay for the server.
Main Bot is still available, and under maintenance.
But it will have more private code and less open source code.
This will not affect any of your usage or development, all migration will happen on new codes.
The main reason to open this project is to make a framework instead of a full bot.
After we give such a lot of functions, we found that we have no time to maintain them.
And more and more APIs are not free to use.
So we have no more time to maintain such a lot of bots.
We are sorry for the inconvenience.
If you like our codes, you can donate to us via the donate button this README file contains or right side of this repository.
Thank you for your support.
A PHP Laravel Telegram Bot
I recommend using systemd to manage laravel queue workers, and systemd-timer to manage laravel schedules.
This is a doc of supervisor + crontab version that laravel recommended.
You can do anything you want.
- All this repo commands are tested on Fedora 37
Make a file tree like this:
/www/server/mariadb/
├── data
└── mysql
└── my.cnf
/www/server/redis/
├── conf
│ └── redis.conf
└── data
Then run:
podman-compose -f docker-compose.yml up -d
If you are using docker, you need to create a bridge network named podman first.
docker network create --driver bridge podman
docker-compose -f docker-compose.yml up -d
dnf update --refresh -y
dnf install supervisor podman* cockpit* --refresh -y
systemctl enable --now supervisord.service
systemctl enable --now nginx.service
systemctl enable --now php-fpm.service
systemctl enable --now container-mariadb.service
systemctl enable --now container-redis.service
composer install
./permission.sh
php artisan key:generate
vim .env
supervisor/init.sh
supervisor/reload.sh
supervisor/start.sh
php artisan migrate
php artisan command:GetWebhookInfo
php artisan command:SetWebhook
php artisan command:DeleteWebhook
If you edited anything, you may need to restart queue workers, to make sure they are using the new configuration, or the new codes to be run.
Otherwise, they may update to the latest configurations and codes after 3600 seconds at most.
So you can send the signal to restart queue workers, via the laravel official command:
php artisan queue:restart
Or force restart with supervisor(not recommended):
supervisor/restart.sh
Or you can let bot call the laravel official command:
Send a message to the bot with the command
/restart