$advanceCooldown
$advanceCooldown
will set a cooldown for a given ID.
Usage
$advanceCooldown[time;id;errorMessage]
- You can retrieve the remaining cooldown in the
$cooldown
function by using%time%
or any of the below.%time%
%year%
%month%
%week%
%day%
%hour%
%min%
%sec%
%ms%
%fullTime%
Parameters
Field | Type | Description | Required |
---|---|---|---|
time | string | The duration of the cooldown. | true |
id | number | The Id of a user, role or anything else. | true |
errorMessage | string | Error message to be displayed when there’s cooldown remaining. | true |
Example(s)
This will set a cooldown for the guild where you execute the command and return the remaining cooldown time:
1client.command({2 name: "advanceCooldown",3 code: `4 $advanceCooldown[2m;$guildID;Please wait %time% to execute this command again.]5 `6});