Refactor interaction handling to remove unused commands and ensure proper command execution for 'gif'

This commit is contained in:
fzzinchemical
2025-04-15 06:48:20 +02:00
parent 0473e32b39
commit 63db6fb27a

View File

@@ -34,12 +34,8 @@ client.on(Events.ClientReady, (readyClient) => {
client.on(Events.InteractionCreate, async (interaction) => { client.on(Events.InteractionCreate, async (interaction) => {
// messagehandler(interaction.command) // messagehandler(interaction.command)
if (!interaction.isChatInputCommand()) return; if (!interaction.isChatInputCommand()) return;
if (interaction.commandName === "gif") {
if (interaction.commandName === "ping") { await commands.execute(interaction)
await interaction.reply("pong");
}
if (interaction.commandName === "pong") {
// if (interaction.options.getString("something something"))
} }
}); });
@@ -80,7 +76,7 @@ try {
await rest.put( await rest.put(
Routes.applicationCommands(client.application.id), Routes.applicationCommands(client.application.id),
{ {
body: [commands], body: [commands.data.toJSON()],
}, },
); );