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) => {
// messagehandler(interaction.command)
if (!interaction.isChatInputCommand()) return;
if (interaction.commandName === "ping") {
await interaction.reply("pong");
}
if (interaction.commandName === "pong") {
// if (interaction.options.getString("something something"))
if (interaction.commandName === "gif") {
await commands.execute(interaction)
}
});
@@ -80,7 +76,7 @@ try {
await rest.put(
Routes.applicationCommands(client.application.id),
{
body: [commands],
body: [commands.data.toJSON()],
},
);