Guide/Getting started/How commands work: prefix, arguments, permissions
How commands work: prefix, arguments, permissions —…
How to write a command: prefix, positional and named arguments, quoting, durations, ranges, and who may run what.
Quick answer
Named arguments skip optional ones
!mute @user 10m spamming
!greeting set join embed:welcome dm:true
!embed create rules "Server rules"Ask the guide
Step by step
Writing a command
| Form | Example | Notes |
|---|---|---|
prefix + name | !ban @user spamming | Everything after the name is the argument list. |
subcommand | !greeting set join #welcome | Commands with subcommands take the subcommand first. Aliases exist, e.g. !embed rm = !embed delete. |
positional | !mute @user 10m spamming | Arguments are read in the order shown by !help: required ones first. |
named | !greeting set join embed:welcome dm:true | option:value (or option=value) in any order. Great for skipping optional arguments. |
quoted | !embed create rules "Server rules" | Quotes keep spaces together; inside a named value too: message:"Welcome {user.mention}!" |
mention or id | !ban @user · !unban 123456789012345678 | Users, roles and channels accept a mention, an id, or (for roles/channels) the name. |
durations | 10m · 2h30m · 3d · 1w · 1mo | Used by mute, lock, remind, giveaways, events, temporary voice. |
ranges | today · 7d · 30d · 90d · 6mo · 1y · 2026-01-01..2026-02-01 | Used by analytics and leaderboards. |
Who can run what
- Discord permissions shown by
!help <command>(Manage Server, Ban Members, Moderate Members…). The server owner and Administrators can always run everything. - Role permissions (
!permission grantor Security → Role permissions) let a role run moderation commands without the Discord permission. - Command overrides (
!commandoverride) disable a built-in command or restrict it to channels or roles. - Cooldowns are per user and per command; the reply tells you how long to wait.
Where the bot answers
Most replies go to the channel you used. Sensitive replies (license status, previews, your own stats when used by staff for someone else) are sent only to you. Commands run in DMs are limited to a few (ban appeals, reminders).
Copy and try
Named arguments skip optional ones
!mute @user 10m spamming
!greeting set join embed:welcome dm:true
!embed create rules "Server rules"Good to know
- Quote values with spaces, including inside named arguments.
- Durations: 10m, 2h30m, 3d, 1w. Ranges: 7d, 30d, 2026-01-01..2026-02-01.
Still stuck? Ask in the support server.