Convert database handler into service, fix skip issue with sound player

This commit is contained in:
Essem 2021-08-10 16:34:29 -05:00
parent 9a1fd3b6f3
commit b2c7a43baa
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
13 changed files with 58 additions and 25 deletions

View file

@ -100,7 +100,7 @@ class Shard extends BaseClusterWorker {
// connect to lavalink
if (!sound.status && !sound.connected) sound.connect(this.bot);
database.setup();
database(this.ipc, "setup");
this.activityChanger();
@ -136,7 +136,7 @@ class Shard extends BaseClusterWorker {
for (const command in collections.commands) {
handler.unload(command);
}
require("./utils/database.js").stop();
database(this.ipc, "stop");
done();
}