This commit is contained in:
parent
3a4eb4be6f
commit
fb46e09d70
@ -26,7 +26,7 @@ class CommandOption implements ICommandOption {
|
|||||||
value?: unknown;
|
value?: unknown;
|
||||||
aliased = false;
|
aliased = false;
|
||||||
strict: boolean;
|
strict: boolean;
|
||||||
private resolver?: IResolver<unknown, unknown, unknown, unknown, unknown>|undefined;
|
private resolver?: IResolver | undefined;
|
||||||
|
|
||||||
constructor (def: CommandOptionDefinition|CommandOption|ICommandOption) {
|
constructor (def: CommandOptionDefinition|CommandOption|ICommandOption) {
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ class CommandOption implements ICommandOption {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clone (rawValue?: string[], resolver?: IResolver<unknown, unknown, unknown, unknown, unknown>): CommandOption {
|
clone (rawValue?: string[], resolver?: IResolver): CommandOption {
|
||||||
const opt = new CommandOption(this);
|
const opt = new CommandOption(this);
|
||||||
opt.rawValue = rawValue;
|
opt.rawValue = rawValue;
|
||||||
opt.resolver = resolver;
|
opt.resolver = resolver;
|
||||||
|
@ -130,7 +130,7 @@ interface ICommandOption {
|
|||||||
|
|
||||||
// private _options?: CommandOptionDefinition
|
// private _options?: CommandOptionDefinition
|
||||||
|
|
||||||
clone(rawValue?: string[], resolver?: IResolver<unknown, unknown, unknown, unknown, unknown>): CommandOption
|
clone(rawValue?: string[], resolver?: IResolver): CommandOption
|
||||||
|
|
||||||
parse(guild: unknown): Promise<ParseResult>
|
parse(guild: unknown): Promise<ParseResult>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
interface IResolver <User, Member, Channel, Role, Guild> {
|
interface IResolver {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should resolve to a user abstraction
|
* Should resolve to a user abstraction
|
||||||
@ -8,7 +8,7 @@ interface IResolver <User, Member, Channel, Role, Guild> {
|
|||||||
* @return {User} {User}
|
* @return {User} {User}
|
||||||
* @memberof IResolver
|
* @memberof IResolver
|
||||||
*/
|
*/
|
||||||
resolveUser(resolveable: string, strict?: boolean): Promise<User | null>
|
resolveUser<User>(resolveable: string, strict?: boolean): Promise<User | null>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should resolve to a member abstraction
|
* Should resolve to a member abstraction
|
||||||
@ -19,7 +19,7 @@ interface IResolver <User, Member, Channel, Role, Guild> {
|
|||||||
* @return {Member} {Member}
|
* @return {Member} {Member}
|
||||||
* @memberof IResolver
|
* @memberof IResolver
|
||||||
*/
|
*/
|
||||||
resolveMember(resolveable: string, strict: boolean, guild: Guild): Promise<Member | null>
|
resolveMember<Guild, Member>(resolveable: string, strict: boolean, guild: Guild): Promise<Member | null>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should resolve to a role abstraction
|
* Should resolve to a role abstraction
|
||||||
@ -30,7 +30,7 @@ interface IResolver <User, Member, Channel, Role, Guild> {
|
|||||||
* @return {Channel} {Channel}
|
* @return {Channel} {Channel}
|
||||||
* @memberof IResolver
|
* @memberof IResolver
|
||||||
*/
|
*/
|
||||||
resolveChannel(resolveable: string, strict: boolean, guild: Guild): Promise<Channel | null>
|
resolveChannel<Guild, Channel>(resolveable: string, strict: boolean, guild: Guild): Promise<Channel | null>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should resolve to a role abstraction
|
* Should resolve to a role abstraction
|
||||||
@ -41,7 +41,7 @@ interface IResolver <User, Member, Channel, Role, Guild> {
|
|||||||
* @return {Role} {Role}
|
* @return {Role} {Role}
|
||||||
* @memberof IResolver
|
* @memberof IResolver
|
||||||
*/
|
*/
|
||||||
resolveRole(resolveable: string, strict: boolean, guild: Guild): Promise<Role | null>
|
resolveRole<Guild, Role>(resolveable: string, strict: boolean, guild: Guild): Promise<Role | null>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should resolve to true when a truthy resolveable is passed, i.e. yes, true, on etc
|
* Should resolve to true when a truthy resolveable is passed, i.e. yes, true, on etc
|
||||||
|
Loading…
Reference in New Issue
Block a user