Table of Contents

Interface ICooldown<TContextType, TBucketType>

Namespace
DisCatSharp.Entities.Core
Assembly
DisCatSharp.dll

Cooldown feature contract

public interface ICooldown<in TContextType, out TBucketType> where TContextType : DisCatSharpCommandContext where TBucketType : CooldownBucket

Type Parameters

TContextType

Type of DisCatSharpCommandContext in which this cooldown handles

TBucketType

Type of Cooldown bucket

Properties

BucketType

Gets the type of the cooldown bucket. This determines how a cooldown is applied.

MaxUses

Gets the maximum number of uses before this command triggers a cooldown for its bucket.

Reset

Gets the time after which the cooldown is reset.

Methods

GetBucket(TContextType)

Gets a cooldown bucket for given context

GetRemainingCooldown(TContextType)

Calculates the cooldown remaining for given context.

RespondRatelimitHitAsync(TContextType, bool, CooldownBucket)

Responds to a ratelimit hit.