No description
  • Go 99.4%
  • Dockerfile 0.6%
Find a file
Alexey Skobkin cb34e43f83
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Implement filtering by addressed username for addressed commands (closes #43)
2025-10-11 00:20:20 +03:00
bot Implement filtering by addressed username for addressed commands (closes #43) 2025-10-11 00:20:20 +03:00
data Complete rewrite (#1) 2025-04-05 00:02:47 +00:00
storage Making bot sent it's responses as replies (closes #33). Also some refactoring. 2025-05-08 00:04:22 +03:00
.drone.yml Complete rewrite (#1) 2025-04-05 00:02:47 +00:00
.env Complete rewrite (#1) 2025-04-05 00:02:47 +00:00
.gitignore Bot commands handlers draft added. Automatic users registration in the DB added. 2024-02-19 05:29:23 +03:00
Dockerfile Removing log level from Dockerfile. 2025-04-18 00:06:36 +03:00
go.mod deps update 2025-04-06 03:06:48 +03:00
go.sum deps update 2025-04-06 03:06:48 +03:00
main.go Allowing log level configuration using env variables too. 2025-04-18 00:18:17 +03:00
README.md Add user's groups listing command "/my" (closes #31) 2025-05-07 21:35:05 +03:00
telegram-group-mention-bot Adding support for '@all' mention group. (fixes #23) 2025-04-18 17:33:39 +03:00

Telegram Group Mention Bot

Build Status

A Telegram bot that allows users to create mention groups and mention all members of a group at once.

Features

  • Create mention groups in any chat
  • Join/leave mention groups
  • Mention all members of a group at once
  • Support for users with and without usernames
  • List group members without mentioning them
  • Delete empty groups

Commands

Command Description
/new <name> Create a new mention group
/join <name> Join an existing mention group
/leave <name> Leave a mention group
/mention <name>, /m <name>, /call <name> Mention all members of a group
/show <name> Show all members of a group without mentioning them
/del <name> Delete a group (only if it has no members)
/list Show all groups in this chat
/my Show groups you've joined in this chat
/help Show this help message

Getting Started

From source

  1. Create a .env file with the following variables:
    TELEGRAM_BOT_TOKEN=your_bot_token_here
    DATABASE_PATH=data.sqlite
    
  2. Run the bot:
    go run main.go
    

Using Docker

You can also run the bot using Docker:

docker run -d \
  -e TELEGRAM_BOT_TOKEN=your_bot_token_here \
  -v ./data:/data \
  skobkin/telegram-group-mention-bot

Configuration

Variable Description Default
TELEGRAM_BOT_TOKEN Your Telegram bot token from @BotFather (required)
DATABASE_PATH Path to the SQLite database file data.sqlite
LOG_LEVEL Logging level (debug, info, warn, error) warn

You can also control logging verbosity using command-line flags:

  • -v - Enable verbose logging (LevelInfo)
  • -vv - Enable very verbose logging (LevelDebug)

Note: Command-line flags take precedence over the LOG_LEVEL environment variable.

Requirements

  • Go 1.16 or later
  • SQLite3
  • Telegram Bot Token (get it from @BotFather)

Dependencies

  • telego - Telegram Bot API library
  • gorm - ORM library
  • godotenv - Environment variables loader