GetAnyMessage is a powerful Telegram bot that lets you retrieve restricted messages (those that cannot be forwarded or copied).
- π Retrieve restricted messages from public chat
- π file support up to 4GB
- π Bypass Telegram forward/copy restrictions
- (Soon the full bot includes copying messages from private chat and much more!)
git clone https://github.com/WizardLoop/GetAnyMessage.git
cd GetAnyMessageInstall PHP dependencies using Docker:
docker compose run --rm composer installdocker compose up --pull always -dThe bot will start running in the background.
docker compose logsLive log output of your bot.
| Command | Description |
|---|---|
docker compose build |
Build the Docker image |
docker compose up --pull always -d |
Start the bot in the background |
docker compose down |
Stop and remove the bot container |
docker compose restart |
Restart the bot quickly |
docker compose logs |
View real-time bot logs |
docker compose exec bot composer dump-autoload |
Reload Composer autoload |
docker compose ps |
Show the status of Docker containers |
Copy .env.example to .env and fill in:
cp .env.example .envTelegram Bot Settings:
API_ID- API IDAPI_HASH- API hashBOT_TOKEN- bot tokenADMIN- username or user ID. Multiple admins supported, comma-separated (e.g.,1234,12345)BOT_NAME- bot name (default:GetAnyMessage)
Database Settings (Optional, for MySQL session storage):
DB_FLAG- Enable MySQL session storage (yes) or disable (no/ leave empty)DB_HOST- MySQL hostDB_PORT- MySQL port (default:3306)DB_USER- MySQL usernameDB_PASS- MySQL passwordDB_NAME- MySQL database name
β οΈ IfDB_FLAGisnoor empty, all DB_* variables are ignored and the bot will use file-based session storage.
This project supports PHPUnit, PHPCS, and PHP-CS-Fixer.
docker compose exec bot vendor/bin/phpunitdocker compose exec bot vendor/bin/phpcs
docker compose exec bot vendor/bin/php-cs-fixer fixPull requests are welcome!
- Fork the repo
- Create a branch:
git checkout -b fix/my-fix - Commit:
git commit -m 'Fix something' - Push:
git push origin fix/my-fix - Open a PR π
Licensed under the GNU AGPL-3.0 see LICENSE.
Questions? Suggestions? Contact @WizardLoop.