mirror of
https://git.arson.gg/lilith/discord-bot.git
synced 2025-12-05 03:34:49 +01:00
quoter
This commit is contained in:
parent
de3c094833
commit
2a84e74cda
6 changed files with 519 additions and 86 deletions
16
src/index.js
16
src/index.js
|
|
@ -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 { }
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue