Modules Documentation 101
Throughout the whole documentation website, you'll find different ways of explaining commands and a few keywords to indicate particular ways of writing a parameter.
Server/Guild, Channel, Message, Role, User IDs
Each entity in Discord is mapped with a unique ID. Knowing what an ID is, and how to get the ID of a said entity is crucial to knowing how a bot works. Obtaining an ID also requires that you have Discord's Developer Mode active.
There are a lot of guides and tutorials about how to activate Developer Mode and how to get an ID for an entity in Discord. This link will bring you to the official Discord support page about this topic.
Obtaining a role ID may be trivial: you can obtain the role ID by prepending a role mention with \, but that message will still mention the role. For most slash-command options you won't need to do this at all - Discord's own autocomplete lets you pick a user, channel, or role directly (no ID typing required), and only options that specifically ask for a raw ID (like /owner guild leave server_id) need one pasted in by hand.
Command Syntax Notation
Throughout this documentation, a command's syntax is shown as a single invocation line, for example:
/ban user:{user} [reason:{text}] [rule:{rule}] [duration:{time code}] [delay:{time code}] [delete_days:{0-7}] | Notation | Meaning |
|---|---|
name:{value} | A required option, no brackets. |
[name:{value}] | Optional - safe to omit entirely. |
{value} | A placeholder description of what to type there, not literal text - user:{user} means "put a user mention/ID/name here", not the literal word "user". |
Since these are real Discord slash commands, you never have to memorize this notation to actually use one - typing / followed by the command name shows every option, its description, and whether it's required, right inside Discord as you type.
Time Format Code
Standard Time Code
Time durations are indicated through the use of a standard time format, which consists of 5 (or 6) time bits:
| Time Bit | Meaning |
|---|---|
mo | month(s) |
w | week(s) |
d | day(s) |
h | hour(s) |
m | minute(s) |
If specified, the time code may allow an extra bit, s for second(s). Each time bit has to be prepended with an actual (positive, integer) number, or omitted if the corresponding time bit would be set to 0.
Warning
Important Note: While some flexibility is allowed in time codes, be sure to write the time bits in the correct order: mo > w > d > h > m > s
That said, a typical time code would be like this:
2mo6h40m = 2 months, 6 hours, 40 minutes Timestamp Mentions
While the standard time code represents a time span (or duration) in an explicit form (e.g. 3 hours; 10 minutes from now; etc.), each command that supports a time code can also be used with a "timestamp mention" (refer to Message Formatting, "Unix Timestamp" or "Unix Timestamp (Styled)").
When using timestamp mentions as a time code replacement, GiselleBot will automatically convert the timestamp into the corresponding "time from now" interval to be used as time span.
This may be particularly useful in some use cases when trying to trigger an action at a certain time of a day (e.g. reminders, repeating messages, scheduled commands, etc.).
Note
You can easily create such timestamp mentions in a Discord-ready syntax using HammerTime by DJDavid98.
Warning
Using timestamp mentions as time code will only work if the timestamp you are using refers to a future date.