mirror of
https://github.com/arthur-pbty/selfbot-discord.git
synced 2026-06-20 05:42:10 +02:00
update
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
const sqlite3 = require('sqlite3').verbose();
|
||||
require('dotenv').config();
|
||||
|
||||
module.exports = function initDB() {
|
||||
let db = new sqlite3.Database(process.env.DB_NAME, sqlite3.OPEN_READWRITE | sqlite3.OPEN_CREATE, (err: Error) => {
|
||||
if (err) {
|
||||
console.error(err.message);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
db.run(`CREATE TABLE IF NOT EXISTS prefix(
|
||||
prefix TEXT NOT NULL DEFAULT '${process.env.DEFAULT_PREFIX}'
|
||||
)`, (err: Error) => {
|
||||
if (err) {
|
||||
console.error(err.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user