Verified Commit dad2bdbb authored by recette lemonweed's avatar recette lemonweed 🇮🇸

fixed breaking sqlite module changes

parent 990eee82
{ {
"name": "Ika3", "name": "Ika3",
"version": "3.3.2", "version": "3.3.3",
"description": "v3 of the Ika Discord bot, built for the DMC Discord server.", "description": "v3 of the Ika Discord bot, built for the DMC Discord server.",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
"minimist": "https://github.com/recette-lemon/minimist-without-numbers", "minimist": "https://github.com/recette-lemon/minimist-without-numbers",
"node-html-parser": "^1.2.16", "node-html-parser": "^1.2.16",
"request": "^2.88.2", "request": "^2.88.2",
"sqlite": "^3.0.3" "sqlite": "^4.0.7",
"sqlite3": "^4.2.0"
} }
} }
...@@ -142,7 +142,10 @@ function initDB(){ ...@@ -142,7 +142,10 @@ function initDB(){
console.log("Setting up DB."); console.log("Setting up DB.");
if(!Fs.existsSync("./ika-db.sqlite")) if(!Fs.existsSync("./ika-db.sqlite"))
var init = true; var init = true;
require("sqlite").open("./ika-db.sqlite").then((m) => { require("sqlite").open({
filename: "./ika-db.sqlite",
driver: require("sqlite3").Database
}).then((m) => {
global.DB = m; global.DB = m;
global.Configs = new ConfigsContainer(); global.Configs = new ConfigsContainer();
if(init) if(init)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment