From 7738b82a56edcdcbbac5b668d6d8a7a9868fdd36 Mon Sep 17 00:00:00 2001 From: Jeremiah Kane <89619734+JKane22@users.noreply.github.com> Date: Wed, 13 Jul 2022 02:49:17 -0400 Subject: [PATCH] Log when host string is null | addition to #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. --- src/events/ready.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/events/ready.js b/src/events/ready.js index 16fd143c..b9ddae31 100644 --- a/src/events/ready.js +++ b/src/events/ready.js @@ -10,9 +10,13 @@ const { PRESENCE } = require("@root/config"); module.exports = async (client) => { client.logger.success(`Logged in as ${client.user.tag}! (${client.user.id})`); - // Initialize Music Manager - client.logger.log("Initializing music manager"); - client.musicManager.init(client.user.id); + // Initialize Music Manager | if Host string is filled out in config file + if ([...config.MUSIC.NODES[0].host].length === 0) { + client.logger.warn("No Host String in Config.json, music will not be available."); + } else { + client.logger.log("Initializing music manager"); + client.musicManager.init(client.user.id); + }; // Update Bot Presence if (PRESENCE.ENABLED) {