add autovoc

This commit is contained in:
Tutur33
2024-03-25 23:01:07 +01:00
parent 8c63190c27
commit c3e3f74f70
@@ -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: '<vocal>',
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.`);
}
};