Core concepts¶
Permissions: Telegram's rights rule¶
Leoward has no rank system of its own. Each command requires the Telegram admin right that matches what it does:
| Telegram right | Commands |
|---|---|
| Change group info | every setting (/setwelcome, /lock, /addblocklist, /setflood…) |
| Delete messages | /del, /purge, /spurge |
| Ban users | /ban, /mute, /kick, /warn, /approve |
| Pin messages | /pin, /unpin, /permapin |
| Add admins | /promote, /demote |
| Manage topics | /newtopic, /closetopic… |
The group owner can do everything. A few destructive commands (/unapproveall, /stopall, /clearall, /reset, /import, /joinfed) are owner only.
Anonymous admins are asked to press a button so the bot can verify their rights before an admin command runs (/anonadmin on disables that check; not recommended).
Approvals¶
An approved user (/approve) is immune to every automated action: locks, blocklists, antiflood, CAPTCHA… without being made an admin. Admins are always exempt.
Actions and modes¶
Many features punish automatically. They all share one vocabulary:
| Mode | Effect |
|---|---|
nothing |
just delete the message |
warn |
warn (see Warnings) |
kick |
remove; they may rejoin |
ban |
ban |
tban 2d |
temporary ban |
mute |
mute |
tmute 1h |
temporary mute |
Prefix with s (sban, skick, smute, swarn) for a silent action that is not announced in the chat. Automated silent actions require /silentactions on, which in turn requires a log channel so admins still find out.
How a message is evaluated¶
- Events: joins, leaves, buttons, join requests.
- Anti-spam (non-exempt users only): locks → blocklists → antiflood. Locks take precedence over blocklists.
- Commands.
- Passive: filters,
#notes,@admin.
History and logging¶
Every moderation action, manual or automated, lands in the user's history (/history) and, if configured, in the log channel, filtered by categories (settings, admin, user, automated, reports, other).
Connections¶
/connect links your private chat to a group: whatever you send the bot in private applies to that group, with the same rights you would have inside. /connection, /reconnect and /disconnect complete the set.
Topics (forums)¶
Settings are shared by all topics of a forum. Welcomes go to the action topic (/setactiontopic).