Documentation
Meet PanguBot
A feature-rich Telegram group management bot running on Cloudflare Workers. Everything you need to keep your groups safe, organised, and automated.
60+Commands
15+Feature modules
∞Groups supported
0msCold start (Workers)
🛡️
Moderation
Ban, kick, mute, warn, temp-ban with reasons and automatic logging.
🔍
Auto-Replies
Filters, notes, hashtag triggers, link buttons — all keyword-based.
👋
Welcome System
Custom messages with variables, random variants, inline buttons, captcha.
🌊
Flood Control
Rate-limit spammers automatically with configurable windows and actions.
🚫
Blacklist
Word-based filtering with warn / mute / kick / ban actions on match.
🏛️
Federations
Cross-group ban sync — ban once, sync to all your groups instantly.
🔒
Locks
Prevent specific message types (stickers, GIFs, URLs, polls…) group-wide.
📋
Log Channel
Every moderation action logged to a private channel with full context.
✅
Approve System
Trusted users bypass locks and flood controls entirely.
💡
Tip: Use the sidebar search to quickly find any command by name. Click any command card to expand its full documentation with syntax and examples.
ℹ️
Admin commands require the user to have administrator privileges in the group. User commands can be used by all members.
Quick Start
Get PanguBot set up in your group in 5 minutes.
Add @PanguBot to your group and promote it as an administrator with the following permissions:
✅ Delete messages
✅ Ban users
✅ Restrict members
✅ Pin messages
✅ Invite users via link
Set a welcome message with the user's name, mention, and a rules button.
Example
/setwelcome 👋 Welcome {mention} to {chatname}!
Please read the rules before chatting.
[📜 Rules](buttonurl://https://t.me/c/YOUR_GROUP/1)
Members can view these with /rules. You can also link to them from your welcome message.
Example
/setrules 1. Be respectful to all members
2. No spam or self-promotion
3. No NSFW content
4. English only
5. Listen to admins
Every ban, kick, warn, mute, flood, and blacklist action gets logged there.
Example
/setlog -1001234567890
/setlog @mylogchannel
Note: Add the bot as admin in your log channel first, then run this command in your group.
Users sending more than 5 messages in 10 seconds will be muted (default). Adjust the number as needed.
Common setup
/setflood 5
/setfloodmode mute
New members are muted until they click a verification button. Blocks most bots from joining.
Example
/captcha on
Variables & Buttons
Use these in welcome messages, goodbye messages, notes, and filters.
| Variable | What it inserts | Example output |
| {first} | User's first name | John |
| {last} | User's last name | Doe |
| {fullname} | Full name (first + last) | John Doe |
| {username} | @username, or full name if none | @johndoe |
| {mention} | Clickable name link | John |
| {id} | User's numeric ID | 123456789 |
| {chatname} | Group title | My Awesome Group |
💡
Random variants: Use %%% to separate message variants — the bot picks one randomly each time.
Example: Welcome {mention}! %%% Hey {first}, glad you joined! %%% 👋 {mention} is here!
Add inline buttons to any note, filter, welcome message, or /post. Put each row on its own line — multiple buttons on the same line appear side-by-side.
Default button
[Button text](buttonurl://https://url)
Blue / Primary
[Button text](buttonurl#primary://https://url)
Button text
Red / Danger
[Button text](buttonurl#danger://https://url)
Button text
Green / Success
[Button text](buttonurl#success://https://url)
Button text
Copy to clipboard
[Copy text](copytext://text to copy)
📋 Copy text
/setwelcome 🎉 Welcome {mention} to {chatname}!
We're glad you're here. Please take a moment to read our community rules before chatting.
[📜 Read Rules](buttonurl#primary://https://t.me/c/123/1) [💬 Chat](buttonurl#success://https://t.me/c/123/2)
[🚫 Report](buttonurl#danger://https://t.me/report)
Ban & Kick
Permanently or temporarily remove members from your group.
Bans a user from the group. They cannot rejoin unless an admin unbans them. You can target by reply, @username, or numeric ID.
Examples
/ban @spammer Sending unsolicited links
/ban 123456789 Ban evasion
(reply to their message) /ban Posting illegal content
Bans a user for a specified duration. They can rejoin automatically after the time expires.
Examples
/tban @user 1h
/tban @user 7d
(reply) /tban 30m
Removes a ban from a user, allowing them to rejoin via invite link.
Example
/unban @username
Removes the user from the group but does not ban them — they can rejoin via invite link immediately.
Example
/kick @username Please re-read the rules before rejoining
Note: Unlike /ban, a kicked user is not prevented from rejoining.
Kicks yourself from the group. Useful when someone wants to leave but the button is buried.
Example
/kickme
Mute
Restrict a user from sending any messages.
Mutes a user indefinitely or for a set duration. A muted user cannot send any message type including text, media, stickers, polls, etc.
Examples
/mute @username
/mute @username 30m
(reply) /mute 2h
Removes the mute restriction, restoring full messaging permissions.
Example
/unmute @username
Warnings
A progressive warning system — when a user hits the limit, a configurable action fires automatically.
ℹ️
Default: 3 warnings → ban. Change with /setwarnlimit and /setwarnmode. Warnings can optionally expire using /setwarntime.
Issues a warning. The bot shows current warn count and a button to remove the warn. When the limit is reached, the configured action fires and warns reset.
Examples
/warn @username Posting external links
(reply to their message) /warn Off-topic content
Issues a warning AND deletes the message you replied to in one action. Use this to silently remove rule-breaking content.
Example
(reply to spam) /dwarn Unsolicited advertisement
Warns a user but the /swarn command message is deleted so other members don't see the moderation action.
Example
/swarn @username Breaking rules
Shows all active warnings for a user. If no user is specified, shows your own warnings.
Examples
/warns @username
/warns
Removes the most recent warning from a user. Alias: /rmwarn
Example
/unwarn @username
Clears every warning for a user, resetting them to zero.
Example
/resetwarns @username
Sets how many warnings before the action triggers. Range: 1–100.
Examples
/setwarnlimit 3
/setwarnlimit 5
Sets what happens when a user hits the warn limit.
Example
/setwarnmode ban
Warnings older than this time are automatically ignored. Use "off" to never expire warnings.
Examples
/setwarntime 7d
/setwarntime 2w
/setwarntime off
Shows warn limit, action mode, and expiry time in one place.
Example
/warnsettings
Locks
Prevent specific message types from being sent by regular members.
ℹ️
Approved users bypass locks entirely. Admins are always exempt.
Any matching message from a non-admin is automatically deleted.
Examples
/lock sticker
/lock url
/lock gif
Flood Control
Automatically action users who send too many messages too quickly.
Sets how many messages a user can send in 10 seconds before action is taken. Use "off" to disable.
Examples
/setflood 5
/setflood off
Default is mute for 5 minutes.
Example
/setfloodmode mute
Blacklist
Automatically remove messages containing specific words or phrases.
Messages containing these words are deleted and the configured action fires. Add multiple words by separating with commas.
Examples
/blacklist spam
/blacklist badword1, badword2, badword3
Example
/unblacklist spam
Example
/setblacklistmode warn
Filters
Auto-reply when a keyword or phrase is detected in chat.
💡
Filters support media replies (photo, video, sticker, GIF, audio), inline buttons, and variable filling — use the same syntax as notes.
When anyone types the keyword, the bot replies with the configured text or media. Use quotes for multi-word triggers.
Examples
/filter hello Hi there! Welcome 👋
/filter "how to join" Send a request and an admin will approve you!
/filter rules Check the pinned message for group rules.
Examples
/stop hello
/stop how to join
Notes
Save and retrieve text snippets, media, or button menus by name.
💡
Retrieve any note by typing #notename in chat — no slash command needed!
Saves text, a photo, video, or document as a named note. You can include buttons using the button syntax.
Text note with button
/save rules 📜 Group Rules:
1. Be respectful
2. No spam
[📌 Pin Rules](buttonurl://https://t.me/c/123/1)
Save from replied photo
(reply to a photo) /save banner This is our banner!
Retrieves a saved note. You can also just type #notename in chat.
Examples
/get rules
#rules
Links
Save keyword-triggered messages with clickable URL buttons.
When someone types the keyword, the bot sends the description with buttons. Buttons on the same line appear side-by-side. Each new line is a new row.
Example
/setlink website 🌐 Our official channels:
[Website](buttonurl://https://example.com) [Channel](buttonurl://https://t.me/chan)
[Support](buttonurl://https://t.me/support)
Welcome & Goodbye
Custom messages shown when members join or leave.
Supports all text variables, %%% random variants, and button syntax.
Example with button and random variants
/setwelcome 🎉 Welcome {mention} to {chatname}! %%% 👋 Hey {first}, glad you're here! %%% {mention} just joined {chatname}!
[📜 Rules](buttonurl#primary://https://t.me/c/1) [💬 Intro](buttonurl://https://t.me/c/2)
Deletes the previous welcome message each time a new member joins, keeping the chat clean.
Example
/cleanwelcome on
Example
/setgoodbye 👋 Goodbye {mention}, we'll miss you in {chatname}!
Silently deletes Telegram's "X joined / left / pinned" service messages to keep chat clean.
Examples
/cleanservice on
/cleanservice join leave
/cleanservice off
Captcha
Require new members to verify they are human before they can chat.
ℹ️
When captcha is on, new members are muted until they click the verify button. After verification, the captcha message is deleted and the welcome message is sent.
Examples
/captcha on
/captcha off
Anti-Raid
Automatically ban users when too many join in a short time window.
Examples
/antiraid on
/antiraid off
Sets how many seconds to watch for a join spike. Default is 60 seconds. Range: 5–600.
Example
/antiraidtime 60
Approve System
Trusted users who bypass locks, flood control, and blacklist checks.
Approved users bypass all locks, flood control, and blacklist checks. Useful for trusted bots or active members.
Example
/approve @trusteduser
Example
/unapprove @username
Federations
Sync bans across multiple groups. Ban once, enforce everywhere.
ℹ️
Create a federation, then have each group's admin /joinfed with the federation ID. Fed admins can /fban to ban across all member groups simultaneously.
Creates a new federation and gives you an ID to share with other group admins.
Example
/newfed My Network Federation
Example
/joinfed ABC12345
Bans the user from every group in the federation simultaneously. Only federation admins can do this.
Example
/fban @scammer Cross-group spam
Example
/funban @username
Federation admins can use /fban and /funban across all member groups.
Example
/fedpromote @trustedadmin
Shows whether a user is banned, an admin, or the owner in the federation.
Example
/fedstat @username
/fedstat @username ABC12345
Rules
Set and display group rules for your members.
Example
/setrules 1. Be respectful
2. No spam or self-promotion
3. No NSFW
4. English only
5. Follow admin instructions
Admin Tools
Pins, promotions, info, and group management utilities.
Reply to a message and run /pin to pin silently. Add "loud" to notify all members. /permapin sends a new message and pins it.
Examples
(reply) /pin
(reply) /pin loud
/permapin 📢 Welcome! Read the rules pinned above.
Examples
/promote @username
/demote @username
Makes the bot add a reaction emoji to the replied message. Add "big" for animated reaction. The /react command itself is deleted.
Examples
(reply) /react 🔥
(reply) /react 👍 big
Shows name, ID, username, group status, and profile photo info.
Examples
/info @username
/info (reply to see their info)
/info (alone = your own info)
Prevents members from using specific commands. Useful to disable /kickme or /rules if not needed.
Examples
/disable kickme
/enable kickme
/disabled
Telegram's native slowmode. Members must wait N seconds between messages.
Examples
/slowmode 30
/slowmode 0
Clean & Purge
Delete messages in bulk and auto-clean bot responses.
Reply to a message and run /purge to delete from that point to now. Or give a count.
Examples
(reply to a message) /purge
/purge 20
Mark a start with /purgefrom, then mark the end with /purgeto. All messages between are deleted.
Example
(reply to first message) /purgefrom
(reply to last message) /purgeto
Examples
/cleanmsg all
/cleanmsg action
/cleanmsg off
Deletes the replied message AND your /del command. Clean removal.
Example
(reply to message) /del
Log Channel
Receive every moderation action in a private Telegram channel.
⚠️
The bot must be added as admin in your log channel before running /setlog.
1. Create a Telegram channel (can be private)
2. Add PanguBot as admin in that channel
3. Get the channel ID (forward a message to @userinfobot)
4. In your group, run: /setlog -1001234567890
5. Check: /logstatus
Examples
/setlog -1001234567890
/setlog @mylogchannel
Sends a test message to the log channel and confirms the connection is working.
Example
/logstatus
Private Connect
Manage your group's notes, filters, and rules from a private chat with the bot.
💡
Start a private chat with PanguBot, connect to your group with /connect, then use /save, /notes, /filter, /setrules etc. without going to the group.
Run this in private chat with the bot. Get the group ID by running /id in your group.
Example
/connect -1001234567890
Misc Commands
Utility commands for everyday group management.
Sends a clean message from the bot with optional inline buttons. Your /post command is deleted so the post looks natural.
Example
/post 📢 Server maintenance tonight at 10pm UTC.
[⏰ Set Reminder](buttonurl://https://t.me/c/1)
Sends your text as a bot message. Your /echo command is deleted.
Example
/echo Hello everyone! Welcome to the new members 👋
Shows the current chat ID, your user ID, and optionally the replied user's ID.
Example
/id
(reply to a user) /id
Notifies all group admins about a message. Reply to the message you want to report.
Example
(reply to message) /report
Note: Use /reports off to disable reporting in your group.
Shows title, ID, member count, admin count, slowmode, description, and more.
Example
/chatinfo