From fcf6f15be95322c65dce34c3b010d3e9b805dc7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Sat, 11 Sep 2021 17:14:43 +0300 Subject: [PATCH] Update ready event --- src/client/events/ready.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/client/events/ready.js b/src/client/events/ready.js index 25ed614..e19b1d9 100644 --- a/src/client/events/ready.js +++ b/src/client/events/ready.js @@ -1,4 +1,6 @@ import Datastore from "../classes/Datastore.js"; +import Radio from "../classes/Radio.js"; +import Streamer from "../classes/Streamer.js"; const _importDynamic = new Function('modulePath', 'return import(modulePath)'); const fetch = (...args) => _importDynamic('node-fetch').then(({default: fetch}) => fetch(...args)); @@ -69,6 +71,12 @@ module.exports = { } }, 3600000); + client.streamer = new Streamer(); + + if(client.stations){ + await client.streamer.init(client); + } + if(!client.stations) { client.user.setStatus('dnd'); } @@ -100,9 +108,11 @@ module.exports = { }, 5000); setTimeout(function () { - /*MAINTENANCE MODE*/ - client.funcs.logger("Maintenance Mode", "Disabled"); - client.config.maintenance = false; + if(client.stations) { + /*MAINTENANCE MODE*/ + client.funcs.logger("Maintenance Mode", "Disabled"); + client.config.maintenance = false; + } }, 10000); }