Interface RateLimitOption<T>

interface RateLimitOption<T> {
    ephemeral?: boolean;
    message?: string | ((interaction: T, timeLeft: number) => Awaitable<string>);
    rateValue?: number;
}

Type Parameters

  • T extends CommandInteraction | SimpleCommandMessage

Properties

ephemeral?: boolean

for interaction only

message?: string | ((interaction: T, timeLeft: number) => Awaitable<string>)

the message to post when a command is called when the user is in rate limit, defaults = "message being rate limited!, please try again at {time}". use the placeholder {time} in your string to get the time you can next call it <t:epoch:T> If a function is supplied, it will pass both the interaction and how many milliseconds are left until the rate limit is over

rateValue?: number

the value to specify how many messages can be called before it is rate limited, defaults to 1