Entity Info
getSlowmode
$getSlowmode
The function $getSlowmode[] returns the slowmode value of a channel in seconds.
Syntax
$getSlowmode[(channelID)]
Parameters
| Parameter | Description |
|---|---|
channelID |
(Optional) The ID of the channel. Default: the current channel (the channel.id supplied by the host). Must be a positive integer, otherwise the error Invalid channel ID. is raised; an unknown channel raises Channel not found. |
Return Value
- Type: Number (string)
- The slowmode of the channel in seconds (
0when slowmode is off, or when the channel type has no slowmode).
Examples
Simple verification
$sendMessage[Current slowmode: $getSlowmode seconds]
Comparison
$if[$getSlowmode==0]
$sendMessage[This channel does not have slowmode enabled.]
$else
$sendMessage[This channel has a slowmode of $getSlowmode seconds.]
$endif
Check another channel
$sendMessage[Slowmode of the log channel: $getSlowmode[123456789]s]
Alert if slowmode is active
$if[$getSlowmode>0]
$title[⏱️ Slowmode Active]
$description[The channel <#$channelID> has a slowmode of **$getSlowmode seconds**.]
$color[#FEE75C]
$endif
Notes
0means slowmode is disabled.- To modify the slowmode, use
$slowmode[channelID;time]or$modifyChannel.
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.