-
Notifications
You must be signed in to change notification settings - Fork 1
Commands Reference
Complete documentation for all JohnnyBot commands. Most commands require the moderator role, except for PetBot interactions which are available to all users.
- Permission Requirements
- Reminder Commands
- Moderation Commands
- Message Management Commands
- Autoreply Commands
- Role Management Commands
- Permission Management Commands
- Event Feed Commands
- Utility Commands
- PetBot Commands
- Archive Commands
| Permission Level | Commands Available | Who Can Use |
|---|---|---|
| Moderator | Most commands | Users with the MODERATOR_ROLE_NAME role |
| Everyone | PetBot commands | All server members |
Note: The moderator role name is configured in
config.pyasMODERATOR_ROLE_NAME.
Manage recurring reminders sent to specific channels at regular intervals.
Description: Sets a reminder message to be sent to a specified channel at regular intervals.
Parameters:
-
channel(required) - The target channel for the reminder -
title(required) - Title of the reminder -
message(required) - The reminder content -
interval(required) - Interval in seconds between reminders
Example:
/set_reminder channel:#general title:"Daily Standup" message:"Don't forget about the daily standup at 9 AM!" interval:86400
Description: Lists all current active reminders.
Parameters: None
Example:
/list_reminders
Description: Deletes a specific reminder by title.
Parameters:
-
title(required) - Title of the reminder to delete
Example:
/delete_reminder title:"Daily Standup"
Description: Deletes all active reminders.
Parameters: None
Example:
/delete_all_reminders
Commands for managing server members and enforcing rules.
Description: Change the state of voice chaperone enforcement.
Parameters:
-
Boolean(required) -True= on,False= off
Example:
/voice_chaperone:True
Description: Kicks up to 64 members from the server.
Parameters:
-
members(required) - Members to kick (separate multiple users with spaces) -
reason(optional) - Reason for the kick
Example:
/kick members:"@user1 @user2" reason:"Violation of server rules"
Description: Kicks up to 64 members with a specified role from the server.
Parameters:
-
role(required) - Role whose members to kick -
reason(optional) - Reason for the kick
Example:
/kick_role role:@Spammers reason:"Mass cleanup of spam accounts"
Description: Timeouts a member for a specified duration.
Parameters:
-
member(required) - Member to timeout -
duration(required) - Timeout duration in seconds -
reason(optional) - Reason for the timeout
Example:
/timeout member:@user duration:3600 reason:"Inappropriate behavior"
Commands for managing and cleaning up messages in channels.
Description: Deletes a specified number of recent messages from a channel.
Parameters:
-
channel(required) - The channel to purge messages from -
limit(required) - Number of messages to delete
Example:
/purge_last_messages channel:#general limit:10
Description: Deletes all messages containing a specific string from a channel.
Parameters:
-
channel(required) - The channel to purge messages from -
search_string(required) - String to search for in messages
Example:
/purge_string channel:#general search_string:"spam"
Description: Deletes all messages sent by webhooks or apps from a channel.
Parameters:
-
channel(required) - The channel to purge messages from
Example:
/purge_webhooks channel:#general
Description: Makes the bot send a message to a specified channel.
Parameters:
-
channel(required) - Target channel -
message(required) - Message to send
Example:
/botsay channel:#announcements message:"Server maintenance will begin in 30 minutes."
Description: Dumps a user's messages from a specified channel into a downloadable file. Compresses the file and hosts it via a temporary web server for 30 minutes.
Important: Make sure your firewall rules are set to allow inbound connections on TCP port 80.
Parameters:
-
user(required) - User whose messages to dump -
channel(required) - Channel to dump messages from -
start_date(required) - Start date in YYYY-MM-DD format (e.g., 2025-01-01) -
limit(optional) - Maximum number of messages to fetch (default: 1000)
Features:
- Retrieves messages with proper pagination
- Handles Discord API rate limits
- Automatically cleans up orphaned dump files
- Provides a download link via DM
- Link expires after 30 minutes
Example:
/message_dump user:@username channel:#general start_date:"2025-01-01" limit:500
Manage automatic reply rules that trigger when users send messages containing specific strings.
Description: Creates a new autoreply rule that automatically responds when a trigger string is found in messages.
Parameters:
-
trigger(required) - The string to watch for in messages (max 500 characters) -
reply(required) - The message to send when the trigger is found (max 2000 characters) -
case_sensitive(optional) - Whether trigger matching should be case sensitive (default: False)
Features:
- Rules are isolated per Discord server
- Only the first matching rule will trigger per message
- Bot messages are ignored to prevent loops
- Rules persist across bot restarts
Example:
/autoreply add trigger:"thanks bot" reply:"You're welcome! 😊" case_sensitive:False
Description: Lists all autoreply rules for the current server.
Parameters: None
Features:
- Shows rule ID, status, trigger, reply, and case sensitivity settings
- Displays up to 10 rules per page
- Available to all users (not just moderators)
- Truncates long strings for better display
Example:
/autoreply list
Description: Removes an autoreply rule by its unique ID.
Parameters:
-
rule_id(required) - The ID of the autoreply rule to remove (shown in/autoreply list)
Example:
/autoreply remove rule_id:123456789_abcd1234
Description: Enables or disables an existing autoreply rule without removing it.
Parameters:
-
rule_id(required) - The ID of the autoreply rule to toggle
Features:
- Disabled rules remain in the system but won't trigger responses
- Useful for temporarily disabling rules without losing them
- Status is shown in
/autoreply list
Example:
/autoreply toggle rule_id:123456789_abcd1234
- Message Processing: When any user sends a message, the bot checks it against all enabled autoreply rules for that server
- Trigger Matching: The bot searches for trigger strings within the message content
- Case Sensitivity: Matching respects the case_sensitive setting for each rule
- Response: If a trigger is found, the bot replies to the message with the configured response
- Single Response: Only the first matching rule will trigger a response per message
-
Rule IDs: Each rule gets a unique ID in the format
{guild_id}_{8_character_hash} -
Storage: Rules are stored in
autoreplies.jsonand loaded into memory for fast processing - Thread Safety: Rule modifications are thread-safe using locks
- Error Handling: Failed replies are logged but don't crash the system
Commands for managing user roles efficiently.
Description: Assigns a role to up to 64 users at once.
Parameters:
-
role(required) - Role to assign to the users -
members(required) - Members to assign the role to
Features:
- Accepts user mentions, user IDs, usernames, or display names
- Supports both spaces and newlines as separators for user lists
Example:
/assign_role role:@Member members:"@user1 @user2 @user3"
Description: Removes a role from up to 64 users at once.
Parameters:
-
role(required) - Role to remove from the users -
members(required) - Members to remove the role from
Example:
/remove_role role:@Temporary members:"@user1 @user2"
Description: Lists all users that do not have any server role assigned (excluding bots).
Parameters: None
Example:
/list_users_without_roles
Mass clone or clear permissions for categories, channels, and roles.
Important Notes:
- All copy commands remove existing permissions from the destination before copying new ones
- The bot cannot manage roles which are at the same level or above any roles the bot has
- Discord blocks bots from managing permissions for roles that have moderator capabilities
- You will have to manage these manually
Description: Clone permissions from a source category to a destination category.
Parameters:
-
source_category(required) - Source category to copy permissions from -
destination_category(required) - Destination category to copy permissions to
Example:
/clone_category_permissions source_category:"Public Channels" destination_category:"New Category"
Description: Clone permissions from a source channel to a destination channel.
Parameters:
-
source_channel(required) - Source channel to copy permissions from -
destination_channel(required) - Destination channel to copy permissions to
Example:
/clone_channel_permissions source_channel:#general destination_channel:#new-channel
Description: Clear permissions from a category.
Parameters:
-
category(required) - Category to clear permissions from
Example:
/clear_category_permissions category:"Old Category"
Description: Clear permissions from a channel.
Parameters:
-
channel(required) - Channel to clear permissions from
Example:
/clear_channel_permissions channel:#old-channel
Description: Sync permissions for all channels in a category with the category's permissions.
Parameters:
-
source_category(required) - Category whose permissions will be synced to all its channels
Example:
/sync_channel_perms source_category:"Public Channels"
Description: Clone permissions from a source role to a destination role.
Parameters:
-
source_role(required) - Source role to copy permissions from -
destination_role(required) - Destination role to copy permissions to
Example:
/clone_role_permissions source_role:@Moderator destination_role:@Junior-Mod
Description: Clear permissions from a role.
Parameters:
-
role(required) - Role to clear permissions from
Example:
/clear_role_permissions role:@Old-Role
Manage calendar feed integrations for automatic event notifications.
Description: Adds a calendar feed URL to check for events, and posts them to a channel. Also adds events to Discord Server Events.
Parameters:
-
calendar_url(required) - URL of the calendar feed -
channel_name(optional) - Channel to post notifications (default: bot-trap)
Example:
/add_event_feed calendar_url:"https://calendar.google.com/calendar/ical/example%40gmail.com/public/basic.ics" channel_name:"events"
Description: Lists all registered calendar feeds.
Parameters: None
Example:
/list_event_feeds
Description: Removes a calendar feed.
Parameters:
-
feed_url(required) - URL of the calendar feed to remove
Example:
/remove_event_feed feed_url:"https://calendar.google.com/calendar/ical/example%40gmail.com/public/basic.ics"
General utility commands for bot management and information.
Description: Sends the last specified number of lines from the bot's log file to the user via DM.
Parameters:
-
lines(required) - Number of lines to retrieve
Example:
/log_tail lines:50
Description: Enables/disables the bot checking for updates.
Parameters:
-
BOOLEAN(required) - Enabled or Disabled
Example:
/update_checking Enabled
Fun interaction commands available to all users (not just moderators).
Description: Check on what the PetBot is up to.
Parameters: None
Example:
/bot_mood
Description: Pet JohnnyBot.
Parameters: None
Example:
/pet_bot
Description: See who JohnnyBot prefers today.
Parameters:
-
user1(required) - First potential favorite -
user2(required) - Second potential favorite
Example:
/bot_pick_fav user1:@Alice user2:@Bob
-
Parameter Formatting:
- Use quotes around parameters that contain spaces
- User mentions can be done with
@usernameor user IDs - Channel references use
#channel-nameformat
-
Batch Operations:
- Many commands support multiple users (up to 64)
- Separate multiple users with spaces or newlines
- Use consistent formatting for better results
-
Permission Considerations:
- Most commands require the moderator role
- The bot cannot manage roles higher than its own
- Some Discord limitations apply to permission management
-
Error Handling:
- Check the bot's response for error messages
- Use
/log_tailto get detailed error information - Ensure proper permissions are set for the bot
- Test commands in a safe environment before using in production
- Use descriptive reasons for moderation actions
- Regular cleanup of old reminders and event feeds
- Monitor logs regularly for any issues
- Keep backups of important configurations