Fix lavalink connection init

This commit is contained in:
Essem 2022-10-01 12:51:57 -05:00
parent c5b50cf73b
commit b9f1ccc39e
No known key found for this signature in database
GPG Key ID: 7D497397CC3A2A8C
2 changed files with 4 additions and 5 deletions

5
app.js
View File

@ -35,7 +35,7 @@ import { paths } from "./utils/collections.js";
// database stuff
import database from "./utils/database.js";
// lavalink stuff
import { checkStatus, reload } from "./utils/soundplayer.js";
import { checkStatus, reload, connect, status, connected } from "./utils/soundplayer.js";
// events
import { endBroadcast, startBroadcast } from "./utils/misc.js";
import { parseThreshold } from "./utils/tempimages.js";
@ -210,6 +210,9 @@ esmBot ${esmBotVersion} (${process.env.GIT_REV})
});
}
// connect to lavalink
if (!status && !connected) connect(client);
client.connect();
}

View File

@ -1,5 +1,4 @@
import { activityChanger, checkBroadcast } from "../utils/misc.js";
import { connect, status, connected } from "../utils/soundplayer.js";
import { send } from "../utils/handler.js";
import { generateList, createPage } from "../utils/help.js";
import { logger } from "../utils/logger.js";
@ -27,9 +26,6 @@ export default async (client) => {
await createPage(process.env.OUTPUT);
logger.log("info", "The help docs have been generated.");
}
// connect to lavalink
if (!status && !connected) connect(client);
checkBroadcast(client);
activityChanger(client);