Update index.ts

This commit is contained in:
Axel Olausson Holtenäs 2022-04-26 12:42:04 +02:00 committed by GitHub
parent 14efd19978
commit 2082276485
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,23 +15,23 @@ export default {
return group
.setName("counters")
.setDescription("Manage guild counters.")
.addSubcommand(modules.create.data)
.addSubcommand(modules.delete_.data);
.addSubcommand(modules.add.data)
.addSubcommand(modules.remove.data);
},
execute: async (interaction: CommandInteraction) => {
const { options } = interaction;
if (options?.getSubcommand() === "create") {
if (options?.getSubcommand() === "add") {
logger?.verbose(`Executing create subcommand`);
return modules.create.execute(interaction);
return modules.add.execute(interaction);
}
if (options?.getSubcommand() === "delete") {
if (options?.getSubcommand() === "remove") {
logger?.verbose(`Executing delete subcommand`);
return modules.delete_.execute(interaction);
return modules.remove.execute(interaction);
}
logger?.verbose(`Unknown subcommand ${options?.getSubcommand()}`);