Namespace: PreconditionResolvers
Functions
parseConstructorPreConditionsCooldown
▸ parseConstructorPreConditionsCooldown<P
, O
>(command
, cooldownLimit
, cooldownDelay
, cooldownScope
, cooldownFilteredUsers
, preconditionContainerArray
): void
Appends the Cooldown
precondition when Command.Options.cooldownLimit and
Command.Options.cooldownDelay are both non-zero.
Type parameters
Name | Type |
---|---|
P | P |
O | extends CommandOptions |
Parameters
Name | Type | Description |
---|---|---|
command | Command <P , O > | The command to parse cooldowns for. |
cooldownLimit | undefined | number | The cooldown limit to use. |
cooldownDelay | undefined | number | The cooldown delay to use. |
cooldownScope | undefined | BucketScope | The cooldown scope to use. |
cooldownFilteredUsers | undefined | string [] | The cooldown filtered users to use. |
preconditionContainerArray | PreconditionContainerArray | The precondition container array to append the precondition to. |
Returns
void
Defined in
projects/framework/src/lib/precondition-resolvers/cooldown.ts:17
parseConstructorPreConditionsNsfw
▸ parseConstructorPreConditionsNsfw(nsfw
, preconditionContainerArray
): void
Appends the NSFW
precondition if SubcommandMappingMethod.nsfw is set to true.
Parameters
Name | Type | Description |
---|---|---|
nsfw | undefined | boolean | Whether this command is NSFW or not. |
preconditionContainerArray | PreconditionContainerArray | The precondition container array to append the precondition to. |
Returns
void
Defined in
projects/framework/src/lib/precondition-resolvers/nsfw.ts:9
parseConstructorPreConditionsRequiredClientPermissions
▸ parseConstructorPreConditionsRequiredClientPermissions(requiredClientPermissions
, preconditionContainerArray
): void
Appends the ClientPermissions
precondition when Command.Options.requiredClientPermissions resolves to a
non-zero bitfield.
Parameters
Name | Type | Description |
---|---|---|
requiredClientPermissions | undefined | PermissionResolvable | The required client permissions. |
preconditionContainerArray | PreconditionContainerArray | The precondition container array to append the precondition to. |
Returns
void
Defined in
projects/framework/src/lib/precondition-resolvers/clientPermissions.ts:11
parseConstructorPreConditionsRequiredUserPermissions
▸ parseConstructorPreConditionsRequiredUserPermissions(requiredUserPermissions
, preconditionContainerArray
): void
Appends the UserPermissions
precondition when Command.Options.requiredUserPermissions resolves to a
non-zero bitfield.
Parameters
Name | Type | Description |
---|---|---|
requiredUserPermissions | undefined | PermissionResolvable | The required user permissions. |
preconditionContainerArray | PreconditionContainerArray | The precondition container array to append the precondition to. |
Returns
void
Defined in
projects/framework/src/lib/precondition-resolvers/userPermissions.ts:11
parseConstructorPreConditionsRunIn
▸ parseConstructorPreConditionsRunIn(runIn
, resolveConstructorPreConditionsRunType
, preconditionContainerArray
): void
Appends the RunIn
precondition based on the values passed, defaulting to null
, which doesn't add a
precondition.
Parameters
Name | Type | Description |
---|---|---|
runIn | CommandRunInUnion | CommandSpecificRunIn | The command's runIn option field from the constructor. |
resolveConstructorPreConditionsRunType | (types : CommandRunInUnion ) => null | readonly ChannelType [] | The function to resolve the run type from the constructor. |
preconditionContainerArray | PreconditionContainerArray | The precondition container array to append the precondition to. |
Returns
void
Defined in
projects/framework/src/lib/precondition-resolvers/runIn.ts:15