Expose sqlite db
parent
62e3adf8a7
commit
860c793259
|
@ -1,3 +1,4 @@
|
||||||
node_modules
|
node_modules
|
||||||
voice_tmp
|
voice_tmp
|
||||||
.env
|
.env
|
||||||
|
*.db
|
11
index.js
11
index.js
|
@ -4,19 +4,18 @@ const tts = require('google-tts-api');
|
||||||
const fetch = require('node-fetch');
|
const fetch = require('node-fetch');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const sha1 = require('sha1');
|
const sha1 = require('sha1');
|
||||||
|
const sqlite = require('sqlite3');
|
||||||
|
|
||||||
let joinedVoiceChannels = [];
|
let joinedVoiceChannels = [];
|
||||||
let modules = [];
|
let modules = [];
|
||||||
|
|
||||||
const bot = new Discord.Client();
|
const bot = new Discord.Client();
|
||||||
|
|
||||||
|
const db = new sqlite.Database(process.env.DB_FILE);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const api = {
|
const api = {
|
||||||
|
db: db,
|
||||||
|
|
||||||
isInVoiceChannel: (channel) => {
|
isInVoiceChannel: (channel) => {
|
||||||
return joinedVoiceChannels.includes(channel);
|
return joinedVoiceChannels.includes(channel);
|
||||||
},
|
},
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -15,6 +15,7 @@
|
||||||
"google-tts-api": "^2.0.2",
|
"google-tts-api": "^2.0.2",
|
||||||
"node-fetch": "^2.6.1",
|
"node-fetch": "^2.6.1",
|
||||||
"opusscript": "^0.0.8",
|
"opusscript": "^0.0.8",
|
||||||
"sha1": "^1.1.1"
|
"sha1": "^1.1.1",
|
||||||
|
"sqlite3": "^5.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue