mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
types(fix): BaseCommandInteractionOptionResolver and CommandInteraction (#6910)
This commit is contained in:
committed by
GitHub
parent
d6685b1c50
commit
673c03f7cf
16
typings/index.d.ts
vendored
16
typings/index.d.ts
vendored
@@ -280,6 +280,7 @@ export abstract class BaseCommandInteraction<Cached extends CacheType = CacheTyp
|
|||||||
public readonly command: ApplicationCommand | ApplicationCommand<{ guild: GuildResolvable }> | null;
|
public readonly command: ApplicationCommand | ApplicationCommand<{ guild: GuildResolvable }> | null;
|
||||||
public options: Omit<
|
public options: Omit<
|
||||||
CommandInteractionOptionResolver<Cached>,
|
CommandInteractionOptionResolver<Cached>,
|
||||||
|
| 'getMessage'
|
||||||
| 'getFocused'
|
| 'getFocused'
|
||||||
| 'getMentionable'
|
| 'getMentionable'
|
||||||
| 'getRole'
|
| 'getRole'
|
||||||
@@ -602,7 +603,7 @@ export abstract class Collector<K, V, F extends unknown[] = []> extends EventEmi
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ApplicationCommandInteractionOptionResolver<Cached extends CacheType = CacheType>
|
export interface ApplicationCommandInteractionOptionResolver<Cached extends CacheType = CacheType>
|
||||||
extends BaseCommandInteractionOptionResolver<Cached> {
|
extends CommandInteractionOptionResolver<Cached> {
|
||||||
getSubcommand(required?: true): string;
|
getSubcommand(required?: true): string;
|
||||||
getSubcommand(required: boolean): string | null;
|
getSubcommand(required: boolean): string | null;
|
||||||
getSubcommandGroup(required?: true): string;
|
getSubcommandGroup(required?: true): string;
|
||||||
@@ -714,6 +715,19 @@ export class CommandInteractionOptionResolver<Cached extends CacheType = CacheTy
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class ContextMenuInteraction<Cached extends CacheType = CacheType> extends BaseCommandInteraction<Cached> {
|
export class ContextMenuInteraction<Cached extends CacheType = CacheType> extends BaseCommandInteraction<Cached> {
|
||||||
|
public options: Omit<
|
||||||
|
CommandInteractionOptionResolver<Cached>,
|
||||||
|
| 'getFocused'
|
||||||
|
| 'getMentionable'
|
||||||
|
| 'getRole'
|
||||||
|
| 'getNumber'
|
||||||
|
| 'getInteger'
|
||||||
|
| 'getString'
|
||||||
|
| 'getChannel'
|
||||||
|
| 'getBoolean'
|
||||||
|
| 'getSubcommandGroup'
|
||||||
|
| 'getSubcommand'
|
||||||
|
>;
|
||||||
public targetId: Snowflake;
|
public targetId: Snowflake;
|
||||||
public targetType: Exclude<ApplicationCommandType, 'CHAT_INPUT'>;
|
public targetType: Exclude<ApplicationCommandType, 'CHAT_INPUT'>;
|
||||||
private resolveContextMenuOptions(data: APIApplicationCommandInteractionData): CommandInteractionOption<Cached>[];
|
private resolveContextMenuOptions(data: APIApplicationCommandInteractionData): CommandInteractionOption<Cached>[];
|
||||||
|
|||||||
Reference in New Issue
Block a user