Entity Info
slowmode
$slowmode
The function $slowmode sets the slowmode delay of a Discord channel. It is a setter: it does not return the current value (use $getSlowmode for that).
Syntax
$slowmode[channelID;time]
The function requires exactly 2 arguments.
Parameters
| Parameter | Description |
|---|---|
channelID |
The ID of the target channel. Required; an invalid ID raises “Invalid channel ID.”. |
time |
The new delay. Required. A plain number is read as seconds; a BDFD duration (10s, 5m, 1h, 1m30s…) is also accepted. 0 disables slowmode. |
Return Value
This function does not return a value.
Allowed range
The delay must be between 0 and 6 hours (21600 seconds). Any other value, or an unreadable duration, raises the error “Slowmode must be between 0 and 6 hours.”.
Examples
Set a 10 second slowmode
$slowmode[$channelID;10s]
$sendMessage[Slowmode set to 10 seconds.]
Disable slowmode
$slowmode[$channelID;0]
$sendMessage[Slowmode disabled.]
Slowmode on another channel
$slowmode[123456789012345678;5m]
Notes
$slowmodeis a setter: use$getSlowmodeto read the current slowmode.- The delay is stored in whole seconds.
Try it
Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.