This commit is contained in:
Ashley Graves 2024-10-11 21:08:19 +02:00
parent de3c094833
commit 2a84e74cda
6 changed files with 519 additions and 86 deletions

View file

@ -49,9 +49,7 @@ client.on(Events.InteractionCreate, async interaction => {
console.error(error);
}
} else if (interaction.isCommand()) {
var options = "";
console.log(`${interaction.user.username} ran /${interaction.commandName}`);
console.log(`${interaction.user.username} ran ${(interaction.isChatInputCommand() ? "/" : '') + interaction.commandName}`);
try {
interaction.defaultModel = "llama-3.1-70b-versatile";
@ -62,11 +60,13 @@ client.on(Events.InteractionCreate, async interaction => {
content: `${err.name}: ${err.message}`,
ephemeral: true
};
if (interaction.replied || interaction.deferred) {
await interaction.followUp(data);
} else {
await interaction.reply(data);
}
try {
if (interaction.replied || interaction.deferred) {
await interaction.followUp(data);
} else {
await interaction.reply(data);
}
} catch { }
}
}
});