cooldown

fun cooldown(millis: Long, key: (CommandContext) -> String = { it.sender.name })

Sets a cooldown for the command.

Parameters

millis

The duration of the cooldown in milliseconds.

key

A function that generates a unique key for tracking the cooldown.