MANAGE_GUILD permission.
Usage
Implementation
src/main.rs:262-268
What This Command Does
Theregister command performs the following actions:
- Interactive Registration: Displays buttons allowing you to choose registration scope
- Guild Registration: Registers commands for the current server only (instant)
- Global Registration: Registers commands for all servers (takes up to 1 hour)
Registration Process
Choose scope
Click one of the registration buttons:
- Register in this guild - Instant, recommended for testing
- Register globally - Takes up to 1 hour, for production use
When to Use
You should run the/register command in these situations:
Initial Setup
When you first add the bot to your Discord server, slash commands won’t appear until you register them.After Bot Updates
If the bot’s commands are updated (new commands, modified parameters, etc.), you need to re-register for changes to take effect.Troubleshooting Missing Commands
If slash commands aren’t appearing in Discord’s autocomplete, running/register can fix the issue.
Registration Scopes
- Guild (Server) Registration
- Global Registration
Recommended for most users
- Commands appear instantly after registration
- Only visible in the current server
- Perfect for testing and server-specific deployments
- Can be updated frequently without delay
Automatic Registration
Faculty Bot also performs automatic global registration on startup:src/main.rs:232-240
/register command is still useful for:
- Instant guild-specific registration
- Re-registering after making local changes
- Troubleshooting registration issues
Registered Commands
The following commands will be registered when you run/register:
User Commands:
/verify(withinitandcodesubcommands)/xp/leaderboard/help
/getmail/set_xp/force_post_mensaplan/rule(with multiple subcommands)/reverify/run(owner only)
- Context menu: “Toggle Pin State”
- Context menu: “Delete Message”
/promote_user/demote_user
Permissions
The user executing this command must have the
MANAGE_GUILD permission in Discord. This is typically reserved for server administrators.Troubleshooting
Commands not appearing after registration
Commands not appearing after registration
- Wait a few minutes for Discord to sync (especially for global registration)
- Try restarting your Discord client
- Ensure the bot has the
applications.commandsscope - Re-run
/registerand choose guild registration for instant results
Permission denied error
Permission denied error
You need the
MANAGE_GUILD permission in Discord to run this command. Contact your server administrator if you don’t have this permission.Registration fails silently
Registration fails silently
Check the bot logs for error messages. Common issues:
- Bot token is invalid
- Bot lacks necessary OAuth scopes
- Discord API is experiencing issues
Some commands missing after registration
Some commands missing after registration
This usually indicates a code issue. Verify that:
- All commands are included in the
commandsvector inmain.rs - Commands don’t have syntax errors preventing registration
- Check bot logs for registration errors
Required Bot Permissions
For slash commands to work properly, ensure your bot has these permissions when added to a server:applications.commands- Required for slash commandsbot- Standard bot scope- Additional permissions based on what the commands do (e.g.,
SEND_MESSAGES,MANAGE_ROLES, etc.)
Related Commands
help
View all available commands and their descriptions