Skip to content

Commit 7738b82

Browse files
authored
Log when host string is null | addition to Khanmanan#43
If and when the host string in the config.json is null, we will warn that to the console and say its not filled out, music wont be available.
1 parent a077d9d commit 7738b82

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/events/ready.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ const { PRESENCE } = require("@root/config");
1010
module.exports = async (client) => {
1111
client.logger.success(`Logged in as ${client.user.tag}! (${client.user.id})`);
1212

13-
// Initialize Music Manager
14-
client.logger.log("Initializing music manager");
15-
client.musicManager.init(client.user.id);
13+
// Initialize Music Manager | if Host string is filled out in config file
14+
if ([...config.MUSIC.NODES[0].host].length === 0) {
15+
client.logger.warn("No Host String in Config.json, music will not be available.");
16+
} else {
17+
client.logger.log("Initializing music manager");
18+
client.musicManager.init(client.user.id);
19+
};
1620

1721
// Update Bot Presence
1822
if (PRESENCE.ENABLED) {

0 commit comments

Comments
 (0)