Expose sqlite db
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -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);
|
||||
},
|
||||
|
2144
package-lock.json
generated
2144
package-lock.json
generated
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"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user