mirror of
https://github.com/arthur-pbty/selfbot-discord.git
synced 2026-06-16 15:57:10 +02:00
add autovoc
This commit is contained in:
@@ -4,21 +4,18 @@ require('dotenv').config();
|
|||||||
const joinVC = require('../../fonctions/joinVC');
|
const joinVC = require('../../fonctions/joinVC');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
aliases: ['autovocset', 'autovoc'],
|
aliases: ['autovocadd'],
|
||||||
description: 'Avoir la latence du bot.',
|
description: 'Avoir la latence du bot.',
|
||||||
emote: '⏱️',
|
emote: '⏱️',
|
||||||
utilisation: '<vocal>',
|
utilisation: '<vocal>',
|
||||||
|
|
||||||
async execute(message: Message, args: string[], client: Client) {
|
async execute(message: Message, args: string[], client: Client) {
|
||||||
const voc = args[0] || 'None';
|
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) {
|
if (err) {
|
||||||
console.error(err.message);
|
console.error(err.message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
message.channel.send(`Le salon vocal ${voc} a été ajouté à la liste des salons vocaux automatiques.`);
|
||||||
joinVC(client, voc);
|
|
||||||
|
|
||||||
message.edit(`Le salon vocal par défaut est maintenant ${voc}`);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user