Documentation
PanguBot — Telegram Group Management
A powerful, feature-rich Telegram group bot built on Cloudflare Workers. Everything you need to keep your groups safe, clean, and well-organised.
50+Commands
8Feature Areas
∞Groups Supported
🚫
Moderation
Ban, kick, mute, warn with reasons, temp-bans, and mod logs
🔍
Filters & Notes
Auto-replies, hashtag notes, saved content with media support
👋
Welcome System
Custom welcome/goodbye with variables, random variants, buttons
🔐
Captcha
Button or math captcha with auto-kick, custom text
🌊
Flood Control
Rate-limiting with configurable ban/kick/mute actions
🏛️
Federations
Cross-group ban sync across multiple communities
📋
Log Channel
Every mod action logged to a dedicated channel
🧹
Auto-Clean
Auto-delete service msgs, commands, and bot replies
💡
Use the sidebar to navigate by topic, or use the search box to find a specific command. Each command card expands to show syntax and examples — tap to open.
Quick Start
Get PanguBot running in your group in under 2 minutes.
1
Add the bot — Search for @PanguWorldBot on Telegram and add it to your group, or use the Add to Group button from the bot's profile.
2
Make it admin — Go to Group Settings → Admins → Add Admin. Give it Delete Messages, Ban Users, and Restrict Members permissions at minimum.
3
Test it works — Send /id in your group. The bot should reply with the chat ID and your user ID.
4
Set up a welcome — Run /setwelcome Welcome {mention}! 👋 to greet new members automatically.
5
Set your rules — Run /setrules followed by your group rules. Members can view them with /rules.
6
Enable captcha (optional) — Run /captcha on to require new members to verify before chatting.
7
Set up log channel (optional) — Create a channel, add the bot as admin there, then run /setlog @yourchannel in your group.
ℹ️
You can manage your group's notes, filters, and rules from a private chat with the bot using /connect [group_id]. This is handy for editing content without cluttering the group.
Variables & Buttons
Use dynamic variables and inline buttons in welcome messages, notes, filters, and posts.
These placeholders are replaced with real values when the message is sent.
| Variable | Replaced With |
| {first} | User's first name |
| {last} | User's last name (empty if none) |
| {fullname} | First + last name combined |
| {username} | @username, or full name if no username |
| {mention} | Clickable name link (tg://user?id=…) |
| {name} | Alias for {mention} |
| {id} | User's numeric Telegram ID |
| {chatname} | Group or chat title |
| {group} | Alias for {chatname} |
Separate multiple versions with %%% — the bot picks one randomly each time.
Welcome {mention}! Happy to have you! 🎉
%%%
Hey {first}, glad you joined! 👋
%%%
{mention} just joined — welcome aboard! 🚀
| Syntax | Description |
| [Text](buttonurl://https://url) | Default grey URL button |
| [Text](buttonurl#primary://https://url) | Blue button |
| [Text](buttonurl#blue://https://url) | Blue button (alias) |
| [Text](buttonurl#danger://https://url) | Red button |
| [Text](buttonurl#red://https://url) | Red button (alias) |
| [Text](buttonurl#success://https://url) | Green button |
| [Text](buttonurl#green://https://url) | Green button (alias) |
| [Text](copytext://text to copy) | Button that copies text to clipboard |
💡
Put multiple buttons on the same line by placing them on the same row. Put them on separate lines to stack them vertically.
Multi-button Example
/setwelcome Welcome {mention} to {chatname}! 🎉
[📜 Rules](buttonurl#primary://https://t.me/c/123) [💬 Support](buttonurl://https://t.me/support)
[📢 Channel](buttonurl#success://https://t.me/channel)
Ban & Kick
Remove users from your group permanently, temporarily, or just once.
ℹ️
All commands work by reply, @username, or user ID. Admins cannot be banned or kicked.
Permanently bans a user. They cannot rejoin unless unbanned.
/ban [reply | @user | ID] [reason]
Examples
/ban @spammer Posting links
(reply to a message) /ban Rule violation
Bans a user for a set duration. They can rejoin after it expires. Supports m (minutes), h (hours), d (days).
/tban [reply | @user | ID] [duration]
Examples
/tban @user 30m
/tban @user 2h
(reply) /tban 3d
Removes the ban so the user can rejoin via invite link.
/unban [reply | @user | ID]
Example
/unban @user
Removes the user from the group but does not ban them. They can rejoin via invite link immediately.
/kick [reply | @user | ID] [reason]
Example
/kick @user Spamming
Any member can use this to remove themselves. They can rejoin via invite link.
Example
/kickme
Mute
Silence users without removing them from the group.
Prevents the user from sending any type of message. Add a duration to auto-unmute.
/mute [reply | @user | ID] [optional duration]
Examples
/mute @user
/mute @user 30m
(reply) /mute 2h
Restores all message permissions for the user.
/unmute [reply | @user | ID]
Example
/unmute @user
Warnings
A progressive discipline system — warn users and auto-action them when they hit the limit.
Issues a warning. Shows current warn count and an inline button to remove the warn. When the user hits the limit, the configured action (ban/kick/mute) triggers automatically.
/warn [reply | @user | ID] [reason]
Examples
/warn @user Posting links
(reply to message) /warn Spamming
Reply to a message — warns the sender AND deletes that message in one go.
/dwarn [reason] (must reply to a message)
Example
(reply to message) /dwarn Inappropriate content
Warns silently — the /swarn command is deleted so members don't see the moderation action. If the warn limit is hit, a brief notice is sent.
/swarn [reply | @user | ID] [reason]
Example
(reply) /swarn Breaking rules
Removes the most recent warning from a user. /rmwarn is an alias.
/unwarn [reply | @user | ID]
Example
/unwarn @user
Shows all active warnings. Members can check their own warns without specifying a user.
/warns [reply | @user | ID]
Examples
/warns @user
/warns (shows your own)
/resetwarns [reply | @user | ID]
Example
/resetwarns @user
/setwarnlimit [number 1–100]
Example
/setwarnlimit 5
Sets whether the user gets banned, kicked, or muted when they hit the warn limit.
/setwarnmode [ban | kick | mute]
Example
/setwarnmode ban
Warnings older than this duration are automatically removed. Supports m, h, d, w. Use off to disable expiry.
/setwarntime [time | off]
Examples
/setwarntime 7d
/setwarntime 12w
/setwarntime off
Shows current warn limit, action mode, and expiry setting.
Example
/warnsettings
When enabled, the bot reacts with ⚠️ to the offending message when a user is warned via a reply.
/setwarnreaction [on | off]
Example
/setwarnreaction on
Locks
Block specific message types from being sent by regular members.
ℹ️
Approved users and admins bypass all locks. See the Approve section to whitelist trusted members.
Messages of the locked type sent by regular members are automatically deleted.
/lock [type]
Available Types
sticker gif url forward bot
audio voice video photo document
poll location contact reaction
Examples
/lock sticker
/lock url
/lock reaction (disables all reactions group-wide)
/unlock [type]
Example
/unlock sticker
Flood Control
Automatically action users who send too many messages too quickly.
Sets how many messages per 10 seconds triggers the flood action. Use off to disable.
/setflood [2–100 | off]
Examples
/setflood 5
/setflood off
Default is mute (5 minutes). Set to ban or kick for stricter enforcement.
/setfloodmode [ban | kick | mute]
Example
/setfloodmode ban
Blacklist
Automatically delete messages containing banned words and action the sender.
Add one or more comma-separated words. Messages containing these words are deleted and the sender is actioned.
/blacklist [word1, word2, ...]
Examples
/blacklist spam
/blacklist badword1, badword2, offensive
/unblacklist [word]
Example
/unblacklist spam
Sets what happens when a blacklisted word is detected. Default is warn.
/setblacklistmode [warn | mute | kick | ban]
Example
/setblacklistmode ban
Filters
Set up keyword-triggered auto-replies with text, media, or buttons.
💡
Filters support media — reply to a photo/video/sticker/document with /filter keyword to save it as the reply.
When a member's message contains the keyword (or exact phrase in quotes), the bot replies automatically. Multi-word phrases must be quoted.
/filter [word] [reply text]
/filter "multi word phrase" [reply text]
(reply to media) /filter [word]
Examples
/filter hello Hi there! Welcome! 👋
/filter "good morning" Good morning everyone! ☀️
(reply to a photo) /filter rules
/stop [word or phrase]
Examples
/stop hello
/stop good morning
Notes
Save and retrieve content by name — text, photos, videos, and documents with optional buttons.
💡
Retrieve any note with #notename directly in chat — no command needed! E.g. just type #rules.
Saves text, or reply to a photo/video/document to save media. Supports inline buttons and variables.
/save [name] [content]
(reply to message/photo/video) /save [name]
Examples
/save rules Please read the group rules!
[📜 View Rules](buttonurl#primary://https://t.me/c/123)
(reply to a photo) /save banner
/save welcome Welcome {mention}! You're member #{id}.
Retrieves a saved note. Alternatively, just type #notename in chat.
/get [name]
Examples
/get rules
#rules (inline shortcut)
Lists all saved note names. Notes are shown as #name hashtag format.
Example
/notes
/delnote [name]
Example
/delnote rules
Links
Save keyword-triggered messages with clickable URL button panels.
When anyone types the keyword, the bot sends the description with the configured URL buttons. Buttons on the same line appear side by side.
/setlink [keyword] [description]
[Btn1](buttonurl://url1) [Btn2](buttonurl://url2)
[Btn3](buttonurl://url3)
Example
/setlink website Our official links!
[🌐 Website](buttonurl://https://example.com) [📢 Channel](buttonurl://https://t.me/channel)
[💬 Support](buttonurl://https://t.me/support)
/dellink [keyword]
Example
/dellink website
Welcome & Goodbye
Greet new members and farewell departing ones with fully customised messages.
💡
Use variables like {mention}, {chatname} and %%% for random variants. See the Variables & Buttons page for all options.
Shown when a new member joins. Supports all variables, random variants (%%%), and inline buttons.
/setwelcome [message with optional buttons]
Example
/setwelcome Welcome {mention} to {chatname}! 🎉
Read the rules before chatting.
[📜 Rules](buttonurl#primary://https://t.me/c/123) [💬 Chat](buttonurl://https://t.me/group)
Removes the custom welcome. The bot falls back to a default message.
Example
/clearwelcome
Shown when a member leaves. Supports all variables.
/setgoodbye [message]
Example
/setgoodbye Goodbye {mention}, we'll miss you! 👋
When enabled, the previous welcome message is deleted each time a new member joins, keeping the chat clean.
/cleanwelcome [on | off]
Example
/cleanwelcome on
Captcha
Verify new members are human before they can chat.
⚠️
New members are muted until they complete verification. If they don't, you can configure the bot to kick them automatically.
/captcha [on | off]
Example
/captcha on
button — member taps a button to verify (default).
math — member solves a simple arithmetic question (multiple choice).
/captchamode [button | math]
Example
/captchamode math
When enabled, users who don't complete the captcha within the kick time are automatically kicked.
/captchakick [on | off]
Example
/captchakick on
Default is 5 minutes. Supports m, h, d.
/captchakicktime [time]
Example
/captchakicktime 10m
Auto-unmutes users even if they haven't solved the captcha. Use off to keep them muted until solved (recommended with captchakick).
/captchamutetime [time | off]
Example
/captchamutetime off
Customises the text on the verification button (button mode only).
/setcaptchatext [button text]
Example
/setcaptchatext ✅ Tap here to verify
Resets to default: "✅ I'm not a bot"
Example
/resetcaptchatext
Anti-Raid
Automatically ban users during coordinated join floods.
⚠️
Anti-raid bans users who join when the join rate exceeds the threshold. The default threshold is 10 joins within the configured time window.
/antiraid [on | off]
Example
/antiraid on
Sets the time window in seconds for counting joins. Default is 60 seconds.
/antiraidtime [seconds 5–600]
Example
/antiraidtime 30
Approve
Whitelist trusted users so they bypass locks, flood control, and blacklist checks.
Approved users bypass locks (sticker, URL, etc.), flood control, and blacklist checks.
/approve [reply | @user | ID]
Example
/approve @trusteduser
/unapprove [reply | @user | ID]
Example
/unapprove @user
Sets a visible label shown next to a member's name in the group. Leave tag empty to remove it. Requires Bot API 9.5+ and restrict members permission.
/settag [reply | @user | ID] [tag text]
Examples
/settag @user VIP
(reply) /settag (removes tag)
Federations
Sync bans across multiple groups with a shared ban list.
ℹ️
Create a federation with /newfed, then share the Fed ID with other group admins so they can /joinfed. Anyone /fbanned is banned in all member groups.
Creates a new federation and gives you a unique Fed ID to share.
/newfed [federation name]
Example
/newfed My Communities Network
/joinfed [fed_id]
Example
/joinfed ABC12345
Permanently deletes the federation. Only the owner can do this.
Example
/delfed
/renamefed [new name]
Example
/renamefed New Network Name
Bans the user in every group that has joined the federation. You must be a fed admin.
/fban [reply | @user | ID] [reason]
Example
/fban @scammer Promoting scam links
/funban [reply | @user | ID]
Example
/funban @user
Shows if a user is banned in the federation, or their role (owner/admin).
/fedstat [reply | @user | ID] [optional fedID]
Examples
/fedstat @user
/fedstat @user ABC12345
Grants the user permission to use /fban and /funban across all fed groups.
/fedpromote [reply | @user | ID]
Example
/fedpromote @moderator
/feddemote [reply | @user | ID]
Example
/feddemote @user
Shows the current federation name, ID, owner, member count, and ban count.
Example
/fedinfo
Rules
Set group rules that members can view any time with /rules.
Can also be run from a private chat connected to the group via /connect.
/setrules [rules text]
Example
/setrules 1. Be respectful
2. No spam or self-promotion
3. No NSFW content
4. English only
5. Follow Telegram TOS
Admin Tools
Pins, promotions, reactions, invites, slowmode, and more utility commands.
Reply to a message to pin it. Add loud to notify all members.
/pin
/pin loud
Examples
(reply to message) /pin
(reply to message) /pin loud
/permapin [message text]
Example
/permapin 📢 Welcome to the group! Read /rules first.
Grants standard admin permissions (manage chat, delete messages, restrict members, pin messages, invite users).
/promote [reply | @user | ID]
Example
/promote @moderator
/demote [reply | @user | ID]
Example
/demote @user
Adds an emoji reaction to the replied message. The /react command is deleted silently. Add big for an animated big reaction.
/react [emoji]
/react [emoji] big
Examples
(reply) /react 🔥
(reply) /react 👍 big
(reply) /react ⚠️
Clears all reactions from the replied message. Command is deleted silently.
Example
(reply to message) /removereactions
Sets Telegram's built-in slowmode. Use 0 to disable. Only specific values are valid.
/slowmode [0 | 10 | 30 | 60 | 300 | 900 | 3600]
Examples
/slowmode 30
/slowmode 0 (disable)
Shows the current invite link. Use /link revoke to generate a new link and invalidate the old one.
/link
/link revoke
Examples
/link
/link revoke
Prevents the command from being used in the group. Silently ignores it when triggered.
/disable [command]
Example
/disable rules
/enable [command]
Example
/enable rules
When enabled, the bot announces in the group whenever a member changes their first name, last name, or username. Detection happens on their next message.
/nametrack [on | off]
Example
/nametrack on
Shows name, ID, username, group status, and whether the user has a profile photo.
/info [reply | @user | ID]
Examples
/info @user
(reply) /info
/info (shows your own)
Shows owner and all admins with their custom titles if set.
Example
/adminlist
Shows title, ID, type, username, member count, admin count, description, slowmode, forum status, and linked chat.
Example
/chatinfo
Shows the chat ID, your ID, and optionally the replied user's ID.
Examples
/id
(reply to user) /id
Clean & Purge
Delete messages, purge history, and auto-clean service messages and bot responses.
Reply to any message to delete it. The /del command is also deleted.
Example
(reply to message) /del
Reply to a message to delete from there up to the current message, or provide a count to delete the last N messages (max 100).
/purge (reply to start point)
/purge [count 1–100]
Examples
(reply to message) /purge
/purge 20
Mark the start with /purgefrom, then reply to the last message with /purgeto.
Example
(reply to first message) /purgefrom
(reply to last message) /purgeto
Automatically deletes Telegram service messages. Enable specific types or use on for all.
/cleanservice on
/cleanservice off
/cleanservice [type1] [type2] ...
Available Types
join leave pin photo title videochat other
Examples
/cleanservice on (all types)
/cleanservice join leave
/nocleanservice [type | all]
Example
/nocleanservice pin
Example
/cleanservicetypes
Automatically deletes command messages after handling. Types: admin (ban/mute/warn etc), user (get/info/id etc), other (unrecognised commands for other bots), or all.
/cleancommand [all | admin | user | other | off]
Examples
/cleancommand all
/cleancommand admin user
/cleancommand off
/keepcommand [all | admin | user | other]
Example
/keepcommand admin
Example
/cleancommandtypes
Bot messages of these types are automatically deleted 5 minutes after being sent. Types: action (ban/mute/kick notices), filter (filter replies), note (note replies).
/cleanmsg [all | action | filter | note | off]
Examples
/cleanmsg all
/cleanmsg action
/cleanmsg off
/keepmsg [all | action | filter | note]
Example
/keepmsg filter
Sends a clean message from the bot. Your /post command is deleted. Supports inline buttons, variables, and media (send a photo/video with /post as caption).
/post [message with optional buttons]
Examples
/post 📢 Server maintenance at 10pm UTC tonight!
/post 🎉 Giveaway time!
[🎁 Enter](buttonurl#success://https://t.me/c/1) [ℹ️ Rules](buttonurl://https://t.me/c/2)
Sends your text as a bot message. Your /echo command is deleted.
/echo [text]
Example
/echo Hello everyone! Welcome to the new members 👋
Notifies all group admins by mention. Reply to the offending message.
Example
(reply to message) /report
/reports [on | off]
Example
/reports off
Log Channel
Forward all moderation actions to a dedicated Telegram channel.
ℹ️
Every ban, kick, mute, warn, flood action, and blacklist trigger is automatically sent to the log channel. You can set a per-group log channel for each group.
1
Create a Telegram channel (private is fine).
2
Add PanguBot as an admin in that channel (needs only "Post Messages" permission).
3
Get the channel ID by forwarding any message from it to @userinfobot, or use its @username.
4
Run /setlog -1001234567890 (or /setlog @yourchannel) in your group.
/setlog [channel_id | @username]
Examples
/setlog -1001234567890
/setlog @mylogchannel
Disconnects the log channel. A final notification is sent to the channel.
Example
/unsetlog
Shows the connected channel name and sends a test message to verify it is still working.
Example
/logstatus
Private Connect
Manage your group's notes, filters, and rules directly from a private chat with the bot.
💡
After connecting, you can use /save, /filter, /setrules, /notes, /filters, and /rules from PM without cluttering your group.
Run this command in private chat with the bot. Get the group ID by running /id in your group first.
/connect [group_id]
Example
/connect -1001234567890
Shows the name and ID of the group your PM is currently connected to.
Example
/connected
Misc & Info
Bot info commands and developer-only broadcast tools.
Shows the bot welcome message in private chat with links to commands and documentation.
Example
/start (in PM)
In a group, admins see the full admin help; members see the user help. In PM, shows the full command list.
Example
/help
Shows the chat ID, your user ID, and optionally the replied user's ID.
Example
/id
⚠️
These commands are only available to the bot developer in private chat. They are silently ignored for all other users.
Sends a message to every group the bot is in. Add --pin to pin in every group (with notification) or --silent to pin silently.
/broadcast [message]
/broadcast [message] --pin
/broadcast [message] --silent
Example
/broadcast New features available! Check /help.
/broadcast 🎉 Bot updated! --pin
Sends a private message to every user who has started the bot.
/broadcastusers [message]
Example
/broadcastusers Hey! Check out our new features.
Exports all KV data as a JSON file. Reply to the backup file with /restore to restore it.
Example
/backup
Reply to a .json backup file to restore all KV data. Shows a confirmation prompt before writing.
Example
(reply to backup .json file) /restore