Add whitelist and chat (LLM) feature
Some checks failed
CI / CI (push) Has been cancelled

This commit is contained in:
SileNce5k 2025-04-30 11:35:32 +02:00
parent 1fd5f6cc6a
commit bb562be042
Signed by: SileNce
GPG key ID: B0A142BB4291B204
4 changed files with 137 additions and 0 deletions

View file

@ -0,0 +1,22 @@
const sqlite3 = require('sqlite3').verbose();
module.exports = async function () {
const db = new sqlite3.Database('data/database.db');
return new Promise ((resolve, reject)=>{
db.run(
`CREATE TABLE IF NOT EXISTS whitelist (
serverId TEXT PRIMARY KEY,
command TEXT),
dateAdded INTEGER`,
(err) => {
if (err) {
console.error(`Error while creating table 'whitelist': ${err}`);
reject(err);
} else {
console.log("Table 'whitelist' created successfully.");
resolve();
}
db.close();
}
);
})
}