🧑💻 Fix more code smells
This commit is contained in:
parent
038b8070f9
commit
a5a4aa93b8
1 changed files with 16 additions and 8 deletions
|
@ -1,6 +1,5 @@
|
||||||
import { SlashCommandBuilder } from "@discordjs/builders";
|
import { SlashCommandBuilder } from "@discordjs/builders";
|
||||||
import { ChatInputCommandInteraction } from "discord.js";
|
import { ChatInputCommandInteraction } from "discord.js";
|
||||||
|
|
||||||
import modules from "./modules";
|
import modules from "./modules";
|
||||||
|
|
||||||
export const builder = new SlashCommandBuilder()
|
export const builder = new SlashCommandBuilder()
|
||||||
|
@ -20,18 +19,27 @@ export const moduleData = modules;
|
||||||
export const execute = async (interaction: ChatInputCommandInteraction) => {
|
export const execute = async (interaction: ChatInputCommandInteraction) => {
|
||||||
switch (interaction.options?.getSubcommand()) {
|
switch (interaction.options?.getSubcommand()) {
|
||||||
case "cpgg":
|
case "cpgg":
|
||||||
return modules.cpgg.execute(interaction);
|
await modules.cpgg.execute(interaction);
|
||||||
|
break;
|
||||||
case "credits":
|
case "credits":
|
||||||
return modules.credits.execute(interaction);
|
await modules.credits.execute(interaction);
|
||||||
|
break;
|
||||||
case "points":
|
case "points":
|
||||||
return modules.points.execute(interaction);
|
await modules.points.execute(interaction);
|
||||||
|
break;
|
||||||
case "welcome":
|
case "welcome":
|
||||||
return modules.welcome.execute(interaction);
|
await modules.welcome.execute(interaction);
|
||||||
|
break;
|
||||||
case "audits":
|
case "audits":
|
||||||
return modules.audits.execute(interaction);
|
await modules.audits.execute(interaction);
|
||||||
|
break;
|
||||||
case "shop":
|
case "shop":
|
||||||
return modules.shop.execute(interaction);
|
await modules.shop.execute(interaction);
|
||||||
|
break;
|
||||||
case "embeds":
|
case "embeds":
|
||||||
return modules.embeds.execute(interaction);
|
await modules.embeds.execute(interaction);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new Error("No module found for that specific command.");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue