Update ready event

This commit is contained in:
Christer Warén 2021-09-11 17:14:43 +03:00
parent 3d066435b4
commit fcf6f15be9

View File

@ -1,4 +1,6 @@
import Datastore from "../classes/Datastore.js"; 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 _importDynamic = new Function('modulePath', 'return import(modulePath)');
const fetch = (...args) => _importDynamic('node-fetch').then(({default: fetch}) => fetch(...args)); const fetch = (...args) => _importDynamic('node-fetch').then(({default: fetch}) => fetch(...args));
@ -69,6 +71,12 @@ module.exports = {
} }
}, 3600000); }, 3600000);
client.streamer = new Streamer();
if(client.stations){
await client.streamer.init(client);
}
if(!client.stations) { if(!client.stations) {
client.user.setStatus('dnd'); client.user.setStatus('dnd');
} }
@ -100,9 +108,11 @@ module.exports = {
}, 5000); }, 5000);
setTimeout(function () { setTimeout(function () {
/*MAINTENANCE MODE*/ if(client.stations) {
client.funcs.logger("Maintenance Mode", "Disabled"); /*MAINTENANCE MODE*/
client.config.maintenance = false; client.funcs.logger("Maintenance Mode", "Disabled");
client.config.maintenance = false;
}
}, 10000); }, 10000);
} }