Constructor SlashCooldownAttribute
- Namespace
- DSharpPlus.SlashCommands.Attributes
- Assembly
- DSharpPlus.SlashCommands.dll
SlashCooldownAttribute(int, double, SlashCooldownBucketType)
Defines a cooldown for this command. This means that users will be able to use the command a specific number of times before they have to wait to use it again.
public SlashCooldownAttribute(int maxUses, double resetAfter, SlashCooldownBucketType bucketType)
Parameters
maxUses
intNumber of times the command can be used before triggering a cooldown.
resetAfter
doubleNumber of seconds after which the cooldown is reset.
bucketType
SlashCooldownBucketTypeType of cooldown bucket. This allows controlling whether the bucket will be cooled down per user, guild, channel, or globally.