Documentation

Technical specifications and manual.

Introduction

GuardBot is an automated system for Telegram group moderation. The bot filters spam, blocks links, stops raids, and verifies new users via captcha. Configuration is executed via Telegram commands. The architecture consists of multiple sub-modules ensuring high availability and zero-delay message processing.

System Requirements

The bot requires Administrator privileges in the target Telegram group. Missing permissions will result in silent failures. No external infrastructure is required on the user side.

Quick Start

Initial configuration guide.

1
Add the bot to your Telegram group via the provided link or username.
2
Grant administrator rights to the bot. Required permissions: Delete messages, Ban users. Optional but recommended: Pin messages, Manage invite links.
3
Send the command /on in the group chat to activate primary protection modules.
4
Configure the desired language (EN/RU) and customize captcha settings via /captcha.
5
Send the command /status to verify system operation and module states.

Commands

Full list of administration commands categorized by function.

Basic Control

  • /on
    Enable protection
  • /off
    Disable protection
  • /status
    Current status
  • /settings
    Detailed settings
  • /help
    This help manual

Working Modes

  • /mode enforce
    Enable blocking
  • /mode audit
    Logging only

Verification

  • /verify on|off
    Toggle verification
  • /captcha
    Captcha settings
  • /addquestion
    Add question
  • /questions
    Questions list

Greetings

  • /welcome on|off
    Toggle welcome
  • /setwelcome
    Set text
  • /welcometest
    Preview
  • /goodbye on|off
    Toggle goodbye
  • /setgoodbye
    Set text

Blacklist

  • /blacklist
    Management menu
  • /blacklist add word
    Add word
  • /blacklist remove word
    Remove word
  • /blacklist list
    Show all

Media Restrictions

  • /restrict type
    Forbid media
  • /unrestrict type
    Allow media
  • /restrictions
    Settings menu
  • /mediasize MB
    Max file size

Anti-Link

  • /links on|off
    Toggle protection
  • /whitelist add domain
    Allow domain
  • /whitelist list
    Allowed list

Anti-Script

  • /antiscript on|off
    Toggle
  • /antiscript block lang
    Block language
  • /antiscript list
    Show status

Slowmode

  • /slowmode on|off
    Toggle
  • /slowmode 30
    Interval in seconds
  • /slowmode reset @user
    Reset timer

Anti-Forward

  • /antiforward on|off
    Toggle
  • /antiforward allow @channel
    Allow channel
  • /antiforward list
    Show status

Limits & Reports

  • /mentionlimit on|off
    Toggle mentions
  • /mentionlimit 5
    Set limit
  • /report reason
    Report (by reply)
  • /reports
    Reports list

Notes & Cleanup

  • /save tag text
    Save note
  • /notes
    Notes list
  • /delnote tag
    Delete note
  • /cleanup on|off
    Toggle cleanup
  • /cleanup status
    Cleanup settings

Stats & Schedule

  • /stats today|week
    Period stats
  • /mystats
    My activity
  • /schedule list
    Tasks list
  • /schedule daily HH:MM text
    Daily task

Backups & Logs

  • /backup
    Create backup
  • /restore
    Restore (by reply)
  • /auditlog
    Action summary
  • /exportlogs 24h|7d
    Export logs

Modules

System logic and protection mechanisms.

Smart Captcha

Four verification methods are supported to prevent automated accounts from joining the group.

  • Button: Standard confirmation via interface button.
  • Math: Arithmetic equations with three difficulty levels.
  • Image: Distorted text generation. Verification requires exact case-sensitive match.
  • Custom: Administrator-defined questions. Verification requires case-insensitive match.

Configuration is managed via the /captcha command. Timeout defaults to 120 seconds. Unverified users are automatically removed.

Anti-raid

The system monitors join rates in real-time. The default threshold is 5 joins within 30 seconds. Exceeding the threshold triggers an automatic 10-minute lockdown.

During lockdown, new members are restricted from sending messages. Administrators receive immediate notifications regarding the incident.

Content Filters

Advanced text analysis prevents multiple forms of group pollution:

  • Rate limits block message floods (configurable low/medium/high).
  • Duplicate detection removes identical repeated messages.
  • Text analysis blocks messages exceeding 50 percent emojis.
  • Text analysis blocks messages exceeding 70 percent uppercase characters.
  • External links and Telegram invites are removed unless present in the whitelist.

FAQ

Technical specifications and limits.

Administrators are exempt from restrictions by default. To apply link filters to administrators, execute the command /links_admin on.
Execute the command /mode audit. The bot will log all violations without restricting users. Review results via /exportlogs 24h.
Users are automatically removed after exceeding the attempt limit (default: 3) or timeout (default: 120 seconds). They can rejoin and try again.
Required: Delete messages, Ban users. Recommended: Pin messages, Manage invite links. Without required permissions the bot will fail silently.
The system monitors join frequency. If 5 or more users join within 30 seconds, a 10-minute lockdown activates automatically. New members cannot send messages during lockdown. Administrators are notified immediately.
Yes. Use /whitelist add domain.com to allow specific domains. Use /whitelist list to view all allowed domains. Telegram invite links are always blocked regardless of whitelist.