mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-11 15:56:27 +02:00
add : backup , antilick and event for antilink , wiki, and upgrade whitelist system with unique whitelist for guild
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user