mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-08 15:18:52 +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:
+12
-1
@@ -38,7 +38,18 @@ module.exports = {
|
||||
if (!data[message.guild.id]) {
|
||||
data[message.guild.id] = {};
|
||||
}
|
||||
data[message.guild.id].modlog = channelId;
|
||||
|
||||
if (data[message.guild.id].modlog && data[message.guild.id].modlog === channelId) {
|
||||
delete data[message.guild.id].modlog;
|
||||
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 modlog a bien etait supprimé")
|
||||
} else {
|
||||
data[message.guild.id].modlog = channelId;
|
||||
}
|
||||
|
||||
db.run('INSERT OR REPLACE INTO gestion (id, value) VALUES (?, ?)', [message.client.user.id, JSON.stringify(data)], function(err) {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user