BaseCommandValidator
class
BaseCommandValidator
sourceexport class BaseCommandValidator extends Validator export class BaseCommandValidator extends ValidatorisValidId(value: unknown): asserts value is string isValidId(value: unknown): asserts value is string| Param | Type | Required |
|---|---|---|
| | Yes |
Returns:
asserts value is string asserts value is string static source
.isValidType(...)
isValidType(value: unknown): asserts value is CommandType isValidType(value: unknown): asserts value is CommandType| Param | Type | Required |
|---|---|---|
| | Yes |
Returns:
asserts value is CommandType asserts value is CommandType static source
.isValidData(...)
isValidData(value: unknown): asserts value is BaseCommand.Data<CommandType>["data"] isValidData(value: unknown): asserts value is BaseCommand.Data<CommandType>["data"]| Param | Type | Required |
|---|---|---|
| | Yes |
Returns:
asserts value is BaseCommand.Data<CommandType>["data"] asserts value is BaseCommand.Data<CommandType>["data"] static source
.isValidCooldown(...)
isValidCooldown(value: unknown): asserts value is BaseCommand.Data<CommandType>["cooldown"] isValidCooldown(value: unknown): asserts value is BaseCommand.Data<CommandType>["cooldown"]| Param | Type | Required |
|---|---|---|
| | Yes |
Returns:
asserts value is BaseCommand.Data<CommandType>["cooldown"] asserts value is BaseCommand.Data<CommandType>["cooldown"] static source
.isValidPreconditions(...)
isValidPreconditions(value: unknown): asserts value is BaseCommand.Data<CommandType>["preconditions"] isValidPreconditions(value: unknown): asserts value is BaseCommand.Data<CommandType>["preconditions"]| Param | Type | Required |
|---|---|---|
| | Yes |
Returns:
asserts value is BaseCommand.Data<CommandType>["preconditions"] asserts value is BaseCommand.Data<CommandType>["preconditions"] static source
.isValidPostconditions(...)
isValidPostconditions(value: unknown): asserts value is BaseCommand.Data<CommandType>["postconditions"] isValidPostconditions(value: unknown): asserts value is BaseCommand.Data<CommandType>["postconditions"]| Param | Type | Required |
|---|---|---|
| | Yes |
Returns:
asserts value is BaseCommand.Data<CommandType>["postconditions"] asserts value is BaseCommand.Data<CommandType>["postconditions"] static source
.isValidDisabledPreconditions(...)
isValidDisabledPreconditions(value: unknown): asserts value is BaseCommand.Data<CommandType>["disabledPreconditions"] isValidDisabledPreconditions(value: unknown): asserts value is BaseCommand.Data<CommandType>["disabledPreconditions"]| Param | Type | Required |
|---|---|---|
| | Yes |
Returns:
asserts value is BaseCommand.Data<CommandType>["disabledPreconditions"] asserts value is BaseCommand.Data<CommandType>["disabledPreconditions"] static source
.isValidDisabledPostconditions(...)
isValidDisabledPostconditions(value: unknown): asserts value is BaseCommand.Data<CommandType>["disabledPostconditions"] isValidDisabledPostconditions(value: unknown): asserts value is BaseCommand.Data<CommandType>["disabledPostconditions"]| Param | Type | Required |
|---|---|---|
| | Yes |
Returns:
asserts value is BaseCommand.Data<CommandType>["disabledPostconditions"] asserts value is BaseCommand.Data<CommandType>["disabledPostconditions"] static source
.isValidExecute(...)
isValidExecute(value: unknown): asserts value is BaseCommand.Data<CommandType>["execute"] isValidExecute(value: unknown): asserts value is BaseCommand.Data<CommandType>["execute"]| Param | Type | Required |
|---|---|---|
| | Yes |
Returns:
asserts value is BaseCommand.Data<CommandType>["execute"] asserts value is BaseCommand.Data<CommandType>["execute"]isValid(value: unknown): asserts value is BaseCommand.Data<CommandType> isValid(value: unknown): asserts value is BaseCommand.Data<CommandType>| Param | Type | Required |
|---|---|---|
| | Yes |
Returns:
asserts value is BaseCommand.Data<CommandType> asserts value is BaseCommand.Data<CommandType>_sapphire_shapeshift0.StringValidator<string> _sapphire_shapeshift0.StringValidator<string>_sapphire_shapeshift0.NativeEnumValidator<CommandType> _sapphire_shapeshift0.NativeEnumValidator<CommandType>_sapphire_shapeshift0.UnionValidator<_sapphire_shapeshift0.UndefinedToOptional<{ name: string; description: string; aliases: string[]|undefined; options: _sapphire_shapeshift0.UndefinedToOptional<{ name: any; description: any; required: any; validate: any; resolve: any; }>[]|undefined; flags: _sapphire_shapeshift0.UndefinedToOptional<{ name: any; shortcut: any; description: any; required: any; multiple: any; validate: any; resolve: any; defaultValues: any; valueType: any; }>[]|undefined; }>|_sapphire_shapeshift0.UndefinedToOptional<{ type: discord_js0.ApplicationCommandType; name: string; }>> _sapphire_shapeshift0.UnionValidator<_sapphire_shapeshift0.UndefinedToOptional<{ name: string; description: string; aliases: string[]|undefined; options: _sapphire_shapeshift0.UndefinedToOptional<{ name: any; description: any; required: any; validate: any; resolve: any; }>[]|undefined; flags: _sapphire_shapeshift0.UndefinedToOptional<{ name: any; shortcut: any; description: any; required: any; multiple: any; validate: any; resolve: any; defaultValues: any; valueType: any; }>[]|undefined; }>|_sapphire_shapeshift0.UndefinedToOptional<{ type: discord_js0.ApplicationCommandType; name: string; }>>_sapphire_shapeshift0.UnionValidator<number|undefined> _sapphire_shapeshift0.UnionValidator<number|undefined> static source
.preconditions
_sapphire_shapeshift0.UnionValidator<_sapphire_shapeshift0.UndefinedToOptional<{ id: string; scope: CommandType[]|undefined; execute: Function; }>[]|undefined> _sapphire_shapeshift0.UnionValidator<_sapphire_shapeshift0.UndefinedToOptional<{ id: string; scope: CommandType[]|undefined; execute: Function; }>[]|undefined> static source
.postconditions
_sapphire_shapeshift0.UnionValidator<_sapphire_shapeshift0.UndefinedToOptional<{ id: string; scope: CommandType[]|undefined; execute: Function; }>[]|undefined> _sapphire_shapeshift0.UnionValidator<_sapphire_shapeshift0.UndefinedToOptional<{ id: string; scope: CommandType[]|undefined; execute: Function; }>[]|undefined> static source
.disabledPreconditions
_sapphire_shapeshift0.UnionValidator<string[]|undefined> _sapphire_shapeshift0.UnionValidator<string[]|undefined> static source
.disabledPostconditions
_sapphire_shapeshift0.UnionValidator<string[]|undefined> _sapphire_shapeshift0.UnionValidator<string[]|undefined>_sapphire_shapeshift0.InstanceValidator<Function> _sapphire_shapeshift0.InstanceValidator<Function>_sapphire_shapeshift0.ObjectValidator<{ id: string; type: CommandType; data: _sapphire_shapeshift0.UndefinedToOptional<{ name: any; description: any; aliases: any; options: any; flags: any; }>|_sapphire_shapeshift0.UndefinedToOptional<{ type: any; name: any; }>; cooldown: number|undefined; preconditions: _sapphire_shapeshift0.UndefinedToOptional<{ id: any; scope: any; execute: any; }>[]|undefined; postconditions: _sapphire_shapeshift0.UndefinedToOptional<{ id: any; scope: any; execute: any; }>[]|undefined; disabledPreconditions: string[]|undefined; disabledPostconditions: string[]|undefined; execute: Function; }, _sapphire_shapeshift0.UndefinedToOptional<{ id: string; type: CommandType; data: _sapphire_shapeshift0.UndefinedToOptional<{ name: any; description: any; aliases: any; options: any; flags: any; }>|_sapphire_shapeshift0.UndefinedToOptional<{ type: any; name: any; }>; cooldown: number|undefined; preconditions: _sapphire_shapeshift0.UndefinedToOptional<{ id: any; scope: any; execute: any; }>[]|undefined; postconditions: _sapphire_shapeshift0.UndefinedToOptional<{ id: any; scope: any; execute: any; }>[]|undefined; disabledPreconditions: string[]|undefined; disabledPostconditions: string[]|undefined; execute: Function; }>> _sapphire_shapeshift0.ObjectValidator<{ id: string; type: CommandType; data: _sapphire_shapeshift0.UndefinedToOptional<{ name: any; description: any; aliases: any; options: any; flags: any; }>|_sapphire_shapeshift0.UndefinedToOptional<{ type: any; name: any; }>; cooldown: number|undefined; preconditions: _sapphire_shapeshift0.UndefinedToOptional<{ id: any; scope: any; execute: any; }>[]|undefined; postconditions: _sapphire_shapeshift0.UndefinedToOptional<{ id: any; scope: any; execute: any; }>[]|undefined; disabledPreconditions: string[]|undefined; disabledPostconditions: string[]|undefined; execute: Function; }, _sapphire_shapeshift0.UndefinedToOptional<{ id: string; type: CommandType; data: _sapphire_shapeshift0.UndefinedToOptional<{ name: any; description: any; aliases: any; options: any; flags: any; }>|_sapphire_shapeshift0.UndefinedToOptional<{ type: any; name: any; }>; cooldown: number|undefined; preconditions: _sapphire_shapeshift0.UndefinedToOptional<{ id: any; scope: any; execute: any; }>[]|undefined; postconditions: _sapphire_shapeshift0.UndefinedToOptional<{ id: any; scope: any; execute: any; }>[]|undefined; disabledPreconditions: string[]|undefined; disabledPostconditions: string[]|undefined; execute: Function; }>> static source
.resolvable
_sapphire_shapeshift0.UnionValidator<_sapphire_shapeshift0.UndefinedToOptional<{ id: string; type: CommandType; data: _sapphire_shapeshift0.UndefinedToOptional<{ name: any; description: any; aliases: any; options: any; flags: any; }>|_sapphire_shapeshift0.UndefinedToOptional<{ type: any; name: any; }>; cooldown: number|undefined; preconditions: _sapphire_shapeshift0.UndefinedToOptional<{ id: any; scope: any; execute: any; }>[]|undefined; postconditions: _sapphire_shapeshift0.UndefinedToOptional<{ id: any; scope: any; execute: any; }>[]|undefined; disabledPreconditions: string[]|undefined; disabledPostconditions: string[]|undefined; execute: Function; }>|_sapphire_shapeshift0.UndefinedToOptional<{ toJSON: Function; }>> _sapphire_shapeshift0.UnionValidator<_sapphire_shapeshift0.UndefinedToOptional<{ id: string; type: CommandType; data: _sapphire_shapeshift0.UndefinedToOptional<{ name: any; description: any; aliases: any; options: any; flags: any; }>|_sapphire_shapeshift0.UndefinedToOptional<{ type: any; name: any; }>; cooldown: number|undefined; preconditions: _sapphire_shapeshift0.UndefinedToOptional<{ id: any; scope: any; execute: any; }>[]|undefined; postconditions: _sapphire_shapeshift0.UndefinedToOptional<{ id: any; scope: any; execute: any; }>[]|undefined; disabledPreconditions: string[]|undefined; disabledPostconditions: string[]|undefined; execute: Function; }>|_sapphire_shapeshift0.UndefinedToOptional<{ toJSON: Function; }>>