Skip to content
Interfacecorev0.12.0

CooldownOptions

Options for Cooldown. per sets the bucket the window applies to and limit the uses allowed per window. notice replaces the refusal.

interface CooldownOptions

Properties

limit

Uses allowed inside one window before the gate refuses.

limit?: number

Default:1

notice

Your Notice class, constructed with the epoch ms the key frees up and thrown in place of the default refusal.

notice?: NoticeConstructor<[resetAt: EpochMs]>

per

The bucket the cooldown window applies to. 'user' scopes by user ID (falls back to global when the source carries no user id). 'guild' scopes by guild ID (falls back to global if no guild), and 'channel' scopes by channel ID (falls back to global if no channel).

per?: 'user' | 'guild' | 'channel'

Default:'user'