diff --git a/src/handler/sern.ts b/src/handler/sern.ts index 4856fab..e049507 100644 --- a/src/handler/sern.ts +++ b/src/handler/sern.ts @@ -69,7 +69,7 @@ export class Handler { if (interaction.guild === null) return; // TODO : handle dms const module = this.findModuleFrom(interaction); if (module === undefined) { - interaction.channel!.send('Unknown slash command!') + interaction.channel!.send('Unknown slash command!'); return; } const res = await this.interactionResult(module, interaction); @@ -192,7 +192,7 @@ export class Handler { */ private findModuleFrom(ctx: T): Files.CommandVal | undefined { - const name = ctx.applicationId === null ? fmt(ctx as Message, this.prefix).shift()! : (ctx as CommandInteraction).commandName + const name = ctx.applicationId === null ? fmt(ctx as Message, this.prefix).shift()! : (ctx as CommandInteraction).commandName; const posCommand = Files.Commands.get(name) ?? Files.Alias.get(name); return posCommand; } diff --git a/src/handler/utilities/higherOrders.ts b/src/handler/utilities/higherOrders.ts index 1174e4f..16cec0b 100644 --- a/src/handler/utilities/higherOrders.ts +++ b/src/handler/utilities/higherOrders.ts @@ -1,5 +1,5 @@ -import type { Application, ApplicationCommandOptionData, Message } from 'discord.js'; -import type { OptionData } from './options'; +import type { Message } from 'discord.js'; +import type { OptionData } from '../../types/options'; type MsgFnArgs = [msgOrInter: Message, prefix?: string]; type MsgFn = (...args: MsgFnArgs) => boolean; diff --git a/src/types/options.ts b/src/types/options.ts index b91ed39..f471762 100644 --- a/src/types/options.ts +++ b/src/types/options.ts @@ -19,8 +19,8 @@ export interface OptionData { AUTO: ApplicationCommandAutocompleteOption NUMBER: ApplicationCommandNumericOptionData INTEGER: ApplicationCommandNumericOptionData - USER : { type: "USER" } & BaseOption - MENTIONABLE: { type : "MENTIONABLE" } & BaseOption - ROLE : { type: "ROLE" } & BaseOption - BOOLEAN : { type: "BOOLEAN" } & BaseOption + USER : { type: 'USER' } & BaseOption + MENTIONABLE: { type : 'MENTIONABLE' } & BaseOption + ROLE : { type: 'ROLE' } & BaseOption + BOOLEAN : { type: 'BOOLEAN' } & BaseOption } \ No newline at end of file