Table of Contents

Constructor SlashCommandCooldownAttribute

Namespace
DisCatSharp.ApplicationCommands.Attributes
Assembly
DisCatSharp.ApplicationCommands.dll

SlashCommandCooldownAttribute(int, double, CooldownBucketType, Type?)

Defines a cooldown for this command. This allows you to define how many times can users execute a specific command.

public SlashCommandCooldownAttribute(int maxUses, double resetAfter, CooldownBucketType bucketType, Type? cooldownResponderType = null)

Parameters

maxUses int

Number of times the command can be used before triggering a cooldown.

resetAfter double

Number of seconds after which the cooldown is reset.

bucketType CooldownBucketType

Type of cooldown bucket. This allows controlling whether the bucket will be cooled down per user, guild, member, channel, and/or globally.

cooldownResponderType Type

The responder type used to respond to cooldown ratelimit hits.

Remarks

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.