Skip to content

This bot allows you to mention all users in a group. Users who wish to receive these notifications will have to sign up using the /in command

License

Notifications You must be signed in to change notification settings

Matt0550/TagEveryoneTelegramBot

Repository files navigation

Forks Stargazers Issues MIT License Discord Docker Pulls


Logo

Tag Everyone Telegram BOT

A Telegram bot to tag everyone in a group

View Demo · Report Bug · Request Feature

Tag Everyone Telegram Bot

This bot allows you to mention all users in a group. Users who wish to receive these notifications will have to sign up using the /in command.

Live demo

You can try the bot on Telegram: https://t.me/Tag_Everyone_TheBot

This instance can be instable.

Features

  • @everyone or @all trigger /everyone command. (like Discord)
  • The user decides whether to subscribe to the list with /in
  • The user decides whether to exit to the list with /out
  • Telegram WebApp support
  • All is saved to SQLite3 database
  • Hosted or self-hosted
  • Docker support

Commands

  • /in - Add yourself to the Everyone's list
  • /out - Remove yourself from the Everyone's list
  • /everyone - Send a message to all in the list
  • /all - Send a message to all in the list
  • /help - Show help message
  • /status - Show the bot status and uptime
  • /stats - NEW, Show the bot stats
  • /announce text - NEW, Send a message to all groups
  • /list - Show the Everyone's list without mention

Instead of the command /everyone or /all, you can use @everyone or @all

Changelog

VERSION 1.3

  • Redesigned database
  • New commands
  • Optimizations
  • WebApp

TO-DO

  • REST API
  • WebApp
  • Ignore tag requests if time enlapsed is > 2min
  • Automatically add all members' group to Everyone's list

Installation - Using Docker Compose (recommended)

version: '3'

services:
  tageveryone_telegrambot:
    image: matt0550/tageveryone_telegrambot
    user: 1001:1001
    environment:
      - token=BOT_TOKEN
      - owner_id=OWNER_ID
      - enable_webapp_server=True
      - webserver_debug=False
      - report_errors_owner=False
      - secret_key=SECRET_KEY
    volumes:
      - /path/to/database-new.db:/src/db/database-new.db
    ports:
      - 5000:5000
    restart: unless-stopped

Run the container with docker-compose up -d

Installation - Using Docker Run

docker run -d \
  -e token=TG_BOT_TOKEN \
  -e owner_id=TG_OWNER_ID \
  -e enable_webapp_server=True \
  -e webserver_debug=False \
  -e report_errors_owner=False \
  -e secret_key=SECRET_KEY \
  -v /path/to/database-new.db:/src/db/database-new.db \
  -p 5000:5000 \
  --name tageveryone_telegrambot \
  matt0550/tageveryone_telegrambot

Installation - Self-Host or docker build

Clone the project

  git clone https://github.com/Matt0550/TagEveryoneTelegramBot

Go to the project directory

  cd TagEveryoneTelegramBot-master

OPTIONAL: use docker to build the image

  docker build -t tageveryone_telegrambot .

If you don't want to use docker, skip this step. Else, change the image in docker-compose.yml with the image name you used. Run the container with docker-compose up -d

Install dependencies

  pip install -r requirements.txt

Start the bot (after setting the environment variables)

  python ./src/main.py

Installation - Using Replit

Important

Outdated. Replit hosting has been disabled for free users.

Go to replit.com and create new Python project

Clone the project to local directory

  git clone https://github.com/Matt0550/TagEveryoneTelegramBot

Move all file to replit project.

Now, click Show hidden files from the menu and open .replit

Set to false the guessImports option.

From the package manager, install python-telegram-bot and flask

From the secrets manager create new secrets with bot token

Open main.py and uncomment this line:

import os
from keep_alive import keep_alive
...
...
keep_alive() # Replit hosting

Change the bot token with this:

os.environ['token']

Now if you want 24/7 hosting, go to Uptimerobot and create a new monitor with the URL provided by Replit.

Help - feedback

You can contact me on:

Discord: https://discord.gg/5WrVyQKWAr

Telegram: https://t.me/Non_Sono_matteo

Mail: mail@matt05.it

License

MIT

Support me

ko-fi

buy-me-a-coffee

paypal

About

This bot allows you to mention all users in a group. Users who wish to receive these notifications will have to sign up using the /in command

Topics

Resources

License

Stars

Watchers

Forks