Skip to content

Commit

Permalink
types(fix): BaseCommandInteractionOptionResolver and CommandInteracti…
Browse files Browse the repository at this point in the history
…on (#6910)
  • Loading branch information
Indian Ocean Roleplay authored Oct 29, 2021
1 parent d6685b1 commit 673c03f
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ export abstract class BaseCommandInteraction<Cached extends CacheType = CacheTyp
public readonly command: ApplicationCommand | ApplicationCommand<{ guild: GuildResolvable }> | null;
public options: Omit<
CommandInteractionOptionResolver<Cached>,
| 'getMessage'
| 'getFocused'
| 'getMentionable'
| 'getRole'
Expand Down Expand Up @@ -602,7 +603,7 @@ export abstract class Collector<K, V, F extends unknown[] = []> extends EventEmi
}

export interface ApplicationCommandInteractionOptionResolver<Cached extends CacheType = CacheType>
extends BaseCommandInteractionOptionResolver<Cached> {
extends CommandInteractionOptionResolver<Cached> {
getSubcommand(required?: true): string;
getSubcommand(required: boolean): string | null;
getSubcommandGroup(required?: true): string;
Expand Down Expand Up @@ -714,6 +715,19 @@ export class CommandInteractionOptionResolver<Cached extends CacheType = CacheTy
}

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 targetType: Exclude<ApplicationCommandType, 'CHAT_INPUT'>;
private resolveContextMenuOptions(data: APIApplicationCommandInteractionData): CommandInteractionOption<Cached>[];
Expand Down

0 comments on commit 673c03f

Please sign in to comment.