diff --git a/commands/automatisation/setautovoc.ts b/commands/automatisation/addautovoc.ts similarity index 62% rename from commands/automatisation/setautovoc.ts rename to commands/automatisation/addautovoc.ts index f2ff5ab..0890433 100644 --- a/commands/automatisation/setautovoc.ts +++ b/commands/automatisation/addautovoc.ts @@ -4,21 +4,18 @@ require('dotenv').config(); const joinVC = require('../../fonctions/joinVC'); module.exports = { - aliases: ['autovocset', 'autovoc'], + aliases: ['autovocadd'], description: 'Avoir la latence du bot.', emote: '⏱️', utilisation: '', async execute(message: Message, args: string[], client: Client) { const voc = args[0] || 'None'; - db.run('UPDATE config SET value = ? WHERE name = "autovoc"', [voc], (err: any) => { + db.run('INSERT INTO autovoc (vocalID) VALUES (?)', [voc], (err: any) => { if (err) { - console.error(err.message); + console.error(err.message); } }); - - joinVC(client, voc); - - message.edit(`Le salon vocal par défaut est maintenant ${voc}`); + message.channel.send(`Le salon vocal ${voc} a été ajouté à la liste des salons vocaux automatiques.`); } }; \ No newline at end of file