mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-18 13:46:29 +02:00
add warn system with , warn , unwarn, and sanction command
This commit is contained in:
+15
-4
@@ -15,7 +15,6 @@ module.exports = {
|
||||
if (err) {
|
||||
console.error(err.message);
|
||||
}
|
||||
console.log('Connected to the backups database.');
|
||||
});
|
||||
|
||||
|
||||
@@ -27,7 +26,6 @@ module.exports = {
|
||||
console.error(err.message);
|
||||
reject(err);
|
||||
} else {
|
||||
console.log('Table gestion created or already exists.');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -36,7 +34,6 @@ module.exports = {
|
||||
console.error(err.message);
|
||||
reject(err);
|
||||
} else {
|
||||
console.log('Table prevname created or already exists.');
|
||||
}
|
||||
});
|
||||
backupdb.run(`CREATE TABLE IF NOT EXISTS backups (
|
||||
@@ -49,9 +46,23 @@ module.exports = {
|
||||
console.error(err.message);
|
||||
reject(err);
|
||||
} else {
|
||||
console.log('Table backups created or already exists.');
|
||||
}
|
||||
});
|
||||
db.run(`
|
||||
CREATE TABLE IF NOT EXISTS warnings (
|
||||
guildId TEXT NOT NULL,
|
||||
userId TEXT NOT NULL,
|
||||
warningId INTEGER NOT NULL,
|
||||
reason TEXT NOT NULL,
|
||||
timestamp INTEGER NOT NULL,
|
||||
PRIMARY KEY (guildId, userId, warningId)
|
||||
);
|
||||
`, (err) => {
|
||||
if (err) {
|
||||
console.error(err.message);
|
||||
} else {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
db.get('SELECT value FROM gestion WHERE id = ?', [client.user.id], (err, row) => {
|
||||
|
||||
Reference in New Issue
Block a user