style(src): ran eslint through project

This commit is contained in:
Jacob Nguyen
2022-02-19 13:16:29 -06:00
parent c8bf7aeb92
commit b19a41ddf0
3 changed files with 8 additions and 8 deletions

View File

@@ -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<T extends Message | CommandInteraction>(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;
}

View File

@@ -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;

View File

@@ -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
}