mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-17 21:39:28 +02:00
grand commit que tutur attend ( marche pas le raidmode en dev)
sinon il y a pleins de truc comme les anti raid , des coorectif ect
This commit is contained in:
@@ -34,16 +34,27 @@ module.exports = {
|
||||
});
|
||||
});
|
||||
|
||||
if (!data[message.guild.id]) {
|
||||
data[message.guild.id] = {};
|
||||
}
|
||||
data[message.guild.id].messagelog = channelId;
|
||||
if (!data[message.guild.id]) {
|
||||
data[message.guild.id] = {};
|
||||
}
|
||||
|
||||
db.run('INSERT OR REPLACE INTO gestion (id, value) VALUES (?, ?)', [message.client.user.id, JSON.stringify(data)], function(err) {
|
||||
if (err) {
|
||||
return console.error(err.message);
|
||||
}
|
||||
});
|
||||
if (data[message.guild.id].messagelog && data[message.guild.id].messagelog === channelId) {
|
||||
delete data[message.guild.id].messagelog;
|
||||
db.run('INSERT OR REPLACE INTO gestion (id, value) VALUES (?, ?)', [message.client.user.id, JSON.stringify(data)], function(err) {
|
||||
if (err) {
|
||||
return console.error(err.message);
|
||||
}
|
||||
});
|
||||
return message.reply("Le salon de messagelog a bien etait supprimé")
|
||||
} else {
|
||||
data[message.guild.id].messagelog = channelId;
|
||||
}
|
||||
|
||||
db.run('INSERT OR REPLACE INTO gestion (id, value) VALUES (?, ?)', [message.client.user.id, JSON.stringify(data)], function(err) {
|
||||
if (err) {
|
||||
return console.error(err.message);
|
||||
}
|
||||
});
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor('#0099ff')
|
||||
|
||||
Reference in New Issue
Block a user