/TagAllBot

A telegram bot that tags all the users in a group.

Primary LanguagePython

Tag All Bot

A telegram bot that tags all the users in a group.

Python Version Code Style

Usage:

Reply to any message with any one of the following:

  • @everyone
  • !everyone
  • @tag
  • !tag

And the bot shall tag everyone in that group.

Aditionally, Bot owner can use following commands:

  • !grant_su: Grants the replied user with "superuser" role, i.e, they can use the bot in any chat.
  • !revoke_su: Revokes the "superuser" role of the replied person.

Bot owner AND Superusers can use following commands:

  • !grant: Grants the replied user with "tag" role, i.e, they can use the bot in that particular chat.
  • !revoke: Revokes the "tag" role of the replied person.

Deploying:

Environment Variables:

Required

  • TOKEN : Bot token from BotFather.
  • OWNER_ID : Telegram user_id of owner. Get it via @userinfobot.
  • DATABASE_URL : URL of your Postgres database. (Automatic if on Heroku).
  • API_URL : URL of the deployed chatidToMembersAPI. Deploy from here: infinity-plus/chatToMembersAPI

Optional

  • WEBHOOK : Set to any value to enable webhooks, otherwise, leave empty to disable webhooks.
  • URL : URL of server for webhooks. (Use https://<appname>.herokuapp.com/ if on Heroku)
  • SUDO_USERS : Space separated list of user_ids that can use the bot everywhere.
  • DND_USERS : Space separated list of user_ids that will not be tagged by the bot.

Deploying locally or on VPS:

  • Clone the repo:
git clone https://github.com/YAIFoundation/TagAllBot.git
  • Install the requirements:
cd TagAllBot
python3 -m pip install -r requirements.txt
  • Start the Bot:
python3 -m tagall_bot

Deploy on HEROKU

Deploy

Built with

Enhanced with: