尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證A Telegram bot that helps mention all members in a group chat. Built with Python and Pyrogram.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗A Telegram bot that helps mention all members in a group chat. Built with Python and Pyrogram.
/all command or @all keyword@all to admins and allowed users, or mention only a chosen list of peoplegit clone https://github.com/VirusAlex/tg-mention-all.git
cd tg-mention-all
.env file from example:cp .env.example .env
.env file with your credentials:TELEGRAM_API_ID=your_api_id
TELEGRAM_API_HASH=your_api_hash
TELEGRAM_BOT_TOKEN=your_bot_token
OWNER_USERNAME=@your_username
docker-compose up -d
/all or @all - Mention all members in the group/exclude - Exclude user from @all mentions (admin only)/include - Include previously excluded user (admin only)/excluded - Show list of excluded users (admin only)/info - Show help messageSettings (admin only):
/settings - Show this chat's settings and lists/whocan admins / /whocan everyone - Who can use @all: only admins and allowed users, or every member (default)/allow, /disallow - Add or remove a user who may use @all when /whocan admins is on/mentionmode list / /mentionmode all - Mention only the people on the chat's mention list, or all members except excluded ones (default)Every user command accepts a reply to the user's message or one or more @usernames, e.g. /include @alice @bob.
/all or @all (reply to a message) to mention all members/exclude and /include to manage mentionsAdministrators can exclude users in two ways:
/exclude/exclude @usernameTo add previously excluded users back:
/include/include @usernameIn big groups you may not want every member to be able to ping everyone:
/whocan admins - from now on only admins can use @all / /all; others get a reply that they don't have permission/allow @username - also let a specific non-admin use it (/disallow @username to undo)Instead of all members, @all can mention a fixed list:
/mentionmode list/include @alice @bob adds people to the list, /exclude @alice removes them/mentionmode all switches back; the list and the excluded users are both keptChats that never change these settings keep the default behaviour.
The bot is containerized using Docker and includes:
A ready-to-use image is published to GitHub Container Registry on every push to master:
ghcr.io/virusalex/tg-mention-all:latest
The bot needs a Redis instance, so run both on a shared network:
docker network create mention_all_bot
docker run -d --name mention_all_bot_redis \
--network mention_all_bot --restart unless-stopped \
redis:alpine redis-server --appendonly yes
docker run -d --name mention_all_bot \
--network mention_all_bot --restart unless-stopped \
-v mention_all_bot_session:/data \
-e TELEGRAM_API_ID=your_api_id \
-e TELEGRAM_API_HASH=your_api_hash \
-e TELEGRAM_BOT_TOKEN=your_bot_token \
-e OWNER_USERNAME=@your_username \
-e REDIS_HOST=mention_all_bot_redis \
ghcr.io/virusalex/tg-mention-all:latest
The -v mention_all_bot_session:/data volume keeps the Pyrogram session (auth key)
across restarts. The session file is never baked into the image or committed to git.
For most setups Docker Compose (above) is simpler since it wires up Redis for you.
Start the bot:
docker-compose up -d
View logs:
docker-compose logs -f bot
Stop the bot:
docker-compose down
docker-compose logs -f
docker-compose ps
Feel free to open issues and submit pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.