Skip to main content

Function: parseConstructorPreConditionsCooldown()

parseConstructorPreConditionsCooldown<P, O>(command: Command<P, O>, cooldownLimit: undefined | number, cooldownDelay: undefined | number, cooldownScope: undefined | BucketScope, cooldownFilteredUsers: undefined | string[], preconditionContainerArray: PreconditionContainerArray): void

Appends the Cooldown precondition when Command.Options.cooldownLimit and Command.Options.cooldownDelay are both non-zero.

Type Parameters

Type Parameter
P
O extends CommandOptions

Parameters

ParameterTypeDescription
commandCommand<P, O>The command to parse cooldowns for.
cooldownLimitundefined | numberThe cooldown limit to use.
cooldownDelayundefined | numberThe cooldown delay to use.
cooldownScopeundefined | BucketScopeThe cooldown scope to use.
cooldownFilteredUsersundefined | string[]The cooldown filtered users to use.
preconditionContainerArrayPreconditionContainerArrayThe precondition container array to append the precondition to.

Returns

void

Defined in

projects/framework/src/lib/precondition-resolvers/cooldown.ts:17