BaseCommandValidator

class

BaseCommandValidator

source
export class BaseCommandValidator extends Validator
export class BaseCommandValidator extends Validator
static source

.isValidId(...)

isValidId(value: unknown): asserts value is string
isValidId(value: unknown): asserts value is string
ParamTypeRequired
value
value
unknown
unknown
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
ParamTypeRequired
value
value
unknown
unknown
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"]
ParamTypeRequired
value
value
unknown
unknown
Yes

Returns:

asserts value is BaseCommand.Data<CommandType>["data"]
asserts value is BaseCommand.Data<CommandType>["data"]

isValidCooldown(value: unknown): asserts value is BaseCommand.Data<CommandType>["cooldown"]
isValidCooldown(value: unknown): asserts value is BaseCommand.Data<CommandType>["cooldown"]
ParamTypeRequired
value
value
unknown
unknown
Yes

Returns:

asserts value is BaseCommand.Data<CommandType>["cooldown"]
asserts value is BaseCommand.Data<CommandType>["cooldown"]

isValidPreconditions(value: unknown): asserts value is BaseCommand.Data<CommandType>["preconditions"]
isValidPreconditions(value: unknown): asserts value is BaseCommand.Data<CommandType>["preconditions"]
ParamTypeRequired
value
value
unknown
unknown
Yes

Returns:

asserts value is BaseCommand.Data<CommandType>["preconditions"]
asserts value is BaseCommand.Data<CommandType>["preconditions"]

isValidPostconditions(value: unknown): asserts value is BaseCommand.Data<CommandType>["postconditions"]
isValidPostconditions(value: unknown): asserts value is BaseCommand.Data<CommandType>["postconditions"]
ParamTypeRequired
value
value
unknown
unknown
Yes

Returns:

asserts value is BaseCommand.Data<CommandType>["postconditions"]
asserts value is BaseCommand.Data<CommandType>["postconditions"]

isValidDisabledPreconditions(value: unknown): asserts value is BaseCommand.Data<CommandType>["disabledPreconditions"]
isValidDisabledPreconditions(value: unknown): asserts value is BaseCommand.Data<CommandType>["disabledPreconditions"]
ParamTypeRequired
value
value
unknown
unknown
Yes

Returns:

asserts value is BaseCommand.Data<CommandType>["disabledPreconditions"]
asserts value is BaseCommand.Data<CommandType>["disabledPreconditions"]

isValidDisabledPostconditions(value: unknown): asserts value is BaseCommand.Data<CommandType>["disabledPostconditions"]
isValidDisabledPostconditions(value: unknown): asserts value is BaseCommand.Data<CommandType>["disabledPostconditions"]
ParamTypeRequired
value
value
unknown
unknown
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"]
ParamTypeRequired
value
value
unknown
unknown
Yes

Returns:

asserts value is BaseCommand.Data<CommandType>["execute"]
asserts value is BaseCommand.Data<CommandType>["execute"]

static source

.isValid(...)

isValid(value: unknown): asserts value is BaseCommand.Data<CommandType>
isValid(value: unknown): asserts value is BaseCommand.Data<CommandType>
ParamTypeRequired
value
value
unknown
unknown
Yes

Returns:

asserts value is BaseCommand.Data<CommandType>
asserts value is BaseCommand.Data<CommandType>

static source

.id

_sapphire_shapeshift0.StringValidator<string>
_sapphire_shapeshift0.StringValidator<string>
static source

.type

_sapphire_shapeshift0.NativeEnumValidator<CommandType>
_sapphire_shapeshift0.NativeEnumValidator<CommandType>
static source

.data

_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>
_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>
_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>
_sapphire_shapeshift0.UnionValidator<string[]|undefined>
_sapphire_shapeshift0.UnionValidator<string[]|undefined>
_sapphire_shapeshift0.UnionValidator<string[]|undefined>
_sapphire_shapeshift0.UnionValidator<string[]|undefined>
_sapphire_shapeshift0.InstanceValidator<Function>
_sapphire_shapeshift0.InstanceValidator<Function>
static source

.object

_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; }>>
_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; }>>