mirror of
https://github.com/arthur-pbty/selfbot-discord.git
synced 2026-06-03 23:36:23 +02:00
35 lines
818 B
TypeScript
35 lines
818 B
TypeScript
import db from './instanceDB';
|
|
|
|
module.exports = function initDB() {
|
|
db.run(`CREATE TABLE IF NOT EXISTS config(
|
|
name TEXT NOT NULL UNIQUE,
|
|
value TEXT NOT NULL
|
|
)`, (err: Error) => {
|
|
if (err) {
|
|
console.error(err.message);
|
|
}
|
|
});
|
|
|
|
|
|
db.run(`CREATE TABLE IF NOT EXISTS task(
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
name TEXT NOT NULL DEFAULT 'Task',
|
|
code TEXT NOT NULL,
|
|
time NUMBER NOT NULL,
|
|
dernier_lancement TEXT NOT NULL DEFAULT '0'
|
|
)`, (err: Error) => {
|
|
if (err) {
|
|
console.error(err.message);
|
|
}
|
|
});
|
|
|
|
|
|
db.run(`CREATE TABLE IF NOT EXISTS stats(
|
|
name TEXT NOT NULL UNIQUE,
|
|
value NUMBER NOT NULL DEFAULT 0
|
|
)`, (err: Error) => {
|
|
if (err) {
|
|
console.error(err.message);
|
|
}
|
|
});
|
|
} |