Expose sqlite db
parent
62e3adf8a7
commit
860c793259
|
@ -1,3 +1,4 @@
|
|||
node_modules
|
||||
voice_tmp
|
||||
.env
|
||||
*.db
|
11
index.js
11
index.js
|
@ -4,19 +4,18 @@ const tts = require('google-tts-api');
|
|||
const fetch = require('node-fetch');
|
||||
const fs = require('fs');
|
||||
const sha1 = require('sha1');
|
||||
const sqlite = require('sqlite3');
|
||||
|
||||
let joinedVoiceChannels = [];
|
||||
let modules = [];
|
||||
|
||||
const bot = new Discord.Client();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const db = new sqlite.Database(process.env.DB_FILE);
|
||||
|
||||
const api = {
|
||||
db: db,
|
||||
|
||||
isInVoiceChannel: (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",
|
||||
"node-fetch": "^2.6.1",
|
||||
"opusscript": "^0.0.8",
|
||||
"sha1": "^1.1.1"
|
||||
"sha1": "^1.1.1",
|
||||
"sqlite3": "^5.0.2"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue