add : backup , antilick and event for antilink , wiki, and upgrade whitelist system with unique whitelist for guild

This commit is contained in:
VALOU3336
2024-03-02 19:14:45 +01:00
parent bad16d792b
commit 5662934adb
17 changed files with 382 additions and 279 deletions
+21
View File
@@ -11,6 +11,13 @@ module.exports = {
}
console.log('Connected to the SQLite database.');
});
const backupdb = new sqlite3.Database('backups.db', (err) => {
if (err) {
console.error(err.message);
}
console.log('Connected to the backups database.');
});
await new Promise((resolve, reject) => {
@@ -32,6 +39,20 @@ module.exports = {
console.log('Table prevname created or already exists.');
}
});
backupdb.run(`CREATE TABLE IF NOT EXISTS backups (
id INTEGER PRIMARY KEY AUTOINCREMENT,
botId TEXT NOT NULL,
backupId TEXT NOT NULL,
createdAt TEXT NOT NULL
)`, (err) => {
if (err) {
console.error(err.message);
reject(err);
} else {
console.log('Table backups created or already exists.');
}
});
db.get('SELECT value FROM gestion WHERE id = ?', [client.user.id], (err, row) => {
if (err) {