PanguBot / Overview
docs
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)
Features

Everything in one bot

🛡️

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.

Step 1 — Add the bot

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

Step 2 — Basic setup

/setwelcome Set your first welcome message admin
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)
/setrules Set your group rules admin
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
/setlog Connect a log channel admin
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.

Step 3 — Enable protections

/setflood 5 Stop message spammers admin
Users sending more than 5 messages in 10 seconds will be muted (default). Adjust the number as needed.
Common setup
/setflood 5 /setfloodmode mute
/captcha on Verify new members admin
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.

Text variables

VariableWhat it insertsExample output
{first}User's first nameJohn
{last}User's last nameDoe
{fullname}Full name (first + last)John Doe
{username}@username, or full name if none@johndoe
{mention}Clickable name linkJohn
{id}User's numeric ID123456789
{chatname}Group titleMy 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!

Button syntax

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

Full example

/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.
/ban Permanently ban a user admin
Bans a user from the group. They cannot rejoin unless an admin unbans them. You can target by reply, @username, or numeric ID.
Syntax
/ban [reply/@user/ID] [reason]
Target methods
Reply to message @username Numeric user ID
Examples
/ban @spammer Sending unsolicited links
/ban 123456789 Ban evasion
(reply to their message) /ban Posting illegal content
/tban Temporary ban with duration admin
Bans a user for a specified duration. They can rejoin automatically after the time expires.
Syntax
/tban [reply/@user/ID] [duration]
Duration formats
m = minutes (e.g. 30m) h = hours (e.g. 2h) d = days (e.g. 7d)
Examples
/tban @user 1h
/tban @user 7d
(reply) /tban 30m
/unban Remove a ban admin
Removes a ban from a user, allowing them to rejoin via invite link.
Syntax
/unban [reply/@user/ID]
Example
/unban @username
/kick Remove without permanent ban admin
Removes the user from the group but does not ban them — they can rejoin via invite link immediately.
Syntax
/kick [reply/@user/ID] [reason]
Example
/kick @username Please re-read the rules before rejoining
Note: Unlike /ban, a kicked user is not prevented from rejoining.
/kickme Leave the group (self) user
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.
/mute Restrict a user from sending messages admin
Mutes a user indefinitely or for a set duration. A muted user cannot send any message type including text, media, stickers, polls, etc.
Syntax
/mute [reply/@user/ID] [duration?]
Duration (optional)
30m, 2h, 7d Omit for indefinite
Examples
/mute @username
/mute @username 30m
(reply) /mute 2h
/unmute Restore messaging ability admin
Removes the mute restriction, restoring full messaging permissions.
Syntax
/unmute [reply/@user/ID]
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.

/warn Warn a user admin
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.
Syntax
/warn [reply/@user/ID] [reason]
Examples
/warn @username Posting external links
(reply to their message) /warn Off-topic content
/dwarn Warn and delete message admin
Issues a warning AND deletes the message you replied to in one action. Use this to silently remove rule-breaking content.
Syntax
/dwarn [reason] (must reply)
Example
(reply to spam) /dwarn Unsolicited advertisement
/swarn Warn silently (command deleted) admin
Warns a user but the /swarn command message is deleted so other members don't see the moderation action.
Syntax
/swarn [reply/@user/ID] [reason]
Example
/swarn @username Breaking rules
/warns View warnings user
Shows all active warnings for a user. If no user is specified, shows your own warnings.
Examples
/warns @username
/warns
/unwarn Remove last warning admin
Removes the most recent warning from a user. Alias: /rmwarn
Example
/unwarn @username
/resetwarns Clear all warnings admin
Clears every warning for a user, resetting them to zero.
Example
/resetwarns @username
/setwarnlimit Set warning threshold admin
Sets how many warnings before the action triggers. Range: 1–100.
Examples
/setwarnlimit 3
/setwarnlimit 5
/setwarnmode Set action on warn limit admin
Sets what happens when a user hits the warn limit.
Options
ban — permanently ban kick — remove (can rejoin) mute — silence indefinitely
Example
/setwarnmode ban
/setwarntime Set warning expiry admin
Warnings older than this time are automatically ignored. Use "off" to never expire warnings.
Formats
m=min, h=hours, d=days, w=weeks
Examples
/setwarntime 7d
/setwarntime 2w
/setwarntime off
/warnsettings View current warn config admin
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.

/lock Lock a message type admin
Any matching message from a non-admin is automatically deleted.
Lock types
sticker gif url forward audio voice video photo document poll location contact bot reaction
Examples
/lock sticker
/lock url
/lock gif
/unlock Remove a lock admin
Example
/unlock sticker
/locks List all active locks user
Example
/locks
Flood Control
Automatically action users who send too many messages too quickly.
/setflood Set flood message limit admin
Sets how many messages a user can send in 10 seconds before action is taken. Use "off" to disable.
Syntax
/setflood [2-100 or off]
Examples
/setflood 5
/setflood off
/setfloodmode Set flood action admin
Default is mute for 5 minutes.
Options
ban / kick / mute
Example
/setfloodmode mute
/flood Show current flood settings user
Example
/flood
Blacklist
Automatically remove messages containing specific words or phrases.
/blacklist Add words to blacklist admin
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
/unblacklist Remove a word admin
Example
/unblacklist spam
/setblacklistmode Action on blacklist match admin
Options
warn / mute / kick / ban
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.

/filter Add a keyword auto-reply admin
When anyone types the keyword, the bot replies with the configured text or media. Use quotes for multi-word triggers.
Syntax
/filter [word] [reply text] /filter "multi word" [reply]
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.
/stop Remove a filter admin
Examples
/stop hello
/stop how to join
/filters List all filters user
Example
/filters
Notes
Save and retrieve text snippets, media, or button menus by name.
💡

Retrieve any note by typing #notename in chat — no slash command needed!

/save Save a note admin
Saves text, a photo, video, or document as a named note. You can include buttons using the button syntax.
Syntax
/save [name] [content] /save [name] (reply to media)
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!
/get Retrieve a note user
Retrieves a saved note. You can also just type #notename in chat.
Examples
/get rules
#rules
/notes List all notes user
Example
/notes
/delnote Delete a note admin
Example
/delnote rules
Welcome & Goodbye
Custom messages shown when members join or leave.
/setwelcome Set welcome message admin
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)
/cleanwelcome on Auto-delete old welcome messages admin
Deletes the previous welcome message each time a new member joins, keeping the chat clean.
Example
/cleanwelcome on
/setgoodbye Set goodbye message admin
Example
/setgoodbye 👋 Goodbye {mention}, we'll miss you in {chatname}!
/cleanservice Delete service messages admin
Silently deletes Telegram's "X joined / left / pinned" service messages to keep chat clean.
Types
join leave pin photo title videochat other on (all) / off (all)
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.

/captcha Toggle captcha verification admin
Examples
/captcha on
/captcha off
Anti-Raid
Automatically ban users when too many join in a short time window.
/antiraid Toggle anti-raid mode admin
Examples
/antiraid on
/antiraid off
/antiraidtime Set detection window (seconds) admin
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.
/approve Approve a user admin
Approved users bypass all locks, flood control, and blacklist checks. Useful for trusted bots or active members.
Example
/approve @trusteduser
/unapprove Remove approval admin
Example
/unapprove @username
/approved List approved users user
Example
/approved
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.

/newfed Create a federation admin
Creates a new federation and gives you an ID to share with other group admins.
Example
/newfed My Network Federation
/joinfed Join a federation admin
Example
/joinfed ABC12345
/fban Ban across all fed groups admin
Bans the user from every group in the federation simultaneously. Only federation admins can do this.
Example
/fban @scammer Cross-group spam
/funban / /unfban Unban from federation admin
Example
/funban @username
/fedpromote / /feddemote Manage federation admins admin
Federation admins can use /fban and /funban across all member groups.
Example
/fedpromote @trustedadmin
/fedstat Check user's fed status user
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.
/setrules Set group rules admin
Example
/setrules 1. Be respectful 2. No spam or self-promotion 3. No NSFW 4. English only 5. Follow admin instructions
/rules Show group rules user
Example
/rules
Admin Tools
Pins, promotions, info, and group management utilities.
/pin / /unpin Pin or unpin messages admin
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.
/promote / /demote Manage admin status admin
Examples
/promote @username
/demote @username
/react React to a message admin
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
/info Get user information user
Shows name, ID, username, group status, and profile photo info.
Examples
/info @username
/info (reply to see their info)
/info (alone = your own info)
/disable / /enable Disable commands in this group admin
Prevents members from using specific commands. Useful to disable /kickme or /rules if not needed.
Examples
/disable kickme
/enable kickme
/disabled
/slowmode Set message rate limiting admin
Telegram's native slowmode. Members must wait N seconds between messages.
Valid values
0, 10, 30, 60, 300, 900, 3600
Examples
/slowmode 30
/slowmode 0
Clean & Purge
Delete messages in bulk and auto-clean bot responses.
/purge Delete multiple messages admin
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
/purgefrom → /purgeto Purge a specific range admin
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
/cleanmsg Auto-delete bot responses after 5 min admin
Types
action — ban/mute/warn responses filter — filter auto-replies note — note retrievals all — all of the above
Examples
/cleanmsg all
/cleanmsg action
/cleanmsg off
/del Delete replied message admin
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.

Setup steps

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
/setlog Connect log channel admin
Examples
/setlog -1001234567890
/setlog @mylogchannel
/logstatus Check log channel connection admin
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.

/connect Connect to a group (in PM) user
Run this in private chat with the bot. Get the group ID by running /id in your group.
Example
/connect -1001234567890
/disconnect Disconnect from group user
Example
/disconnect
Misc Commands
Utility commands for everyday group management.
/post Send a clean announcement admin
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)
/echo Bot repeats your text admin
Sends your text as a bot message. Your /echo command is deleted.
Example
/echo Hello everyone! Welcome to the new members 👋
/id Get chat and user IDs user
Shows the current chat ID, your user ID, and optionally the replied user's ID.
Example
/id
(reply to a user) /id
/report Report a message to admins user
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.
/adminlist List all group admins user
Example
/adminlist
/chatinfo Detailed group info user
Shows title, ID, member count, admin count, slowmode, description, and more.
Example
/chatinfo