Skip to content

Commit ef4581f

Browse files
committed
Fix
1 parent c144ea8 commit ef4581f

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/handlers/InteractionCommandHandler.ts

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ export async function InteractionCommandHandler(interaction: CommandInteraction
3535
member: interaction.member,
3636
memberPermissions: interaction.memberPermissions,
3737
command: command,
38+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
39+
// @ts-expect-error
3840
arguments: interaction.options,
3941
deferReply: interaction.deferReply.bind(interaction),
4042
deleteReply: interaction.deleteReply.bind(interaction),

src/lib/structures/contexts/CommandContext.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,11 @@ import {
1313
WebhookEditMessageOptions
1414
} from 'discord.js';
1515
import {GClient} from '../../GClient';
16-
17-
type ArgumentsType<Cached extends CacheType = CacheType> = Omit<CommandInteractionOptionResolver<Cached>, | 'getMessage' | 'getFocused' | 'getMentionable' | 'getRole' | 'getNumber' | 'getInteger' | 'getString' | 'getChannel' | 'getBoolean' | 'getSubcommandGroup' | 'getSubcommand'>
18-
1916
export interface CommandContextOptions<Cached extends CacheType = CacheType> extends ContextOptions<Cached> {
2017
interaction?: CommandInteraction | ContextMenuInteraction;
2118
message?: Message;
2219
command: Command;
23-
arguments: ArgumentsType;
20+
arguments: CommandInteractionOptionResolver<Cached>;
2421
deferReply: <Fetch extends boolean = boolean>(options?: InteractionDeferReplyOptions & { fetchReply?: Fetch }) => Promise<Fetch extends true ? GuildCacheMessage<Cached> : void>;
2522
deleteReply: () => Promise<void>;
2623
editReply: (options: string | MessagePayload | WebhookEditMessageOptions) => Promise<GuildCacheMessage<Cached>>;
@@ -34,7 +31,7 @@ export class CommandContext<Cached extends CacheType = CacheType> extends Contex
3431
public message?: Message;
3532
public readonly command: Command;
3633
public readonly commandName: string;
37-
public arguments: ArgumentsType;
34+
public arguments: CommandInteractionOptionResolver<Cached>;
3835
public deferred = false;
3936
public replied = false;
4037
public deferReply: <Fetch extends boolean = boolean>(options?: InteractionDeferReplyOptions & { fetchReply?: Fetch }) => Promise<Fetch extends true ? GuildCacheMessage<Cached> : void>;

0 commit comments

Comments
 (0)