From 88fdad4ab932fd8f1a76e84c50c53ea8ef9a31f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Sun, 12 Sep 2021 17:39:38 +0300 Subject: [PATCH] Update maintenance command --- src/client/commands/maintenance.js | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/client/commands/maintenance.js b/src/client/commands/maintenance.js index de6d185..013f416 100644 --- a/src/client/commands/maintenance.js +++ b/src/client/commands/maintenance.js @@ -59,6 +59,18 @@ module.exports = { label: "Disable Maintenance Mode", description: "", value: "9" + }, + { + emoji: "💤", + label: "Streamer Mode – Manual", + description: "", + value: "10" + }, + { + emoji: "📡", + label: "Streamer Mode – Auto", + description: "", + value: "11" } ); @@ -142,6 +154,36 @@ module.exports = { client.user.setStatus('online'); client.funcs.logger("Maintenance Mode", "Disabled"); client.config.maintenance = false; + break; + case "10": + client.config.maintenance = true; + client.user.setStatus('idle'); + client.funcs.saveRadios(client); + + client.config.streamerMode = "manual"; + client.streamer.leave(client); + client.streamer.init(client); + + let guilds = await client.guilds.fetch(); + client.funcs.restoreRadios(client, guilds); + client.user.setStatus('online'); + client.config.maintenance = false; + + break; + case "11": + client.config.maintenance = true; + client.user.setStatus('idle'); + client.funcs.saveRadios(client); + + client.config.streamerMode = "auto"; + client.streamer.leave(client); + client.streamer.init(client); + + let guilds = await client.guilds.fetch(); + client.funcs.restoreRadios(client, guilds); + client.user.setStatus('online'); + client.config.maintenance = false; + break; default: