From d70f4ab2ce545389c8b8f8e13a386f54543b29af Mon Sep 17 00:00:00 2001 From: Izwzyzx <184772711+Izwzyzx@users.noreply.github.com> Date: Sun, 26 Feb 2023 17:43:36 -0600 Subject: [PATCH] Added DevMode and MOTD toggles --- Onequestionmark.hx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Onequestionmark.hx b/Onequestionmark.hx index 019484a..049e902 100644 --- a/Onequestionmark.hx +++ b/Onequestionmark.hx @@ -60,6 +60,26 @@ class Onequestionmark { Sys.println("Shutdown command received from botowner, exiting."); shutdown(); } + case "devmode": + if (m.author.id == settings.botowner) { + if (!settings.devmode) { + settings.devmode = true; + m.reply({content:"DevMode enabled."}, false); + } else { + settings.devmode = false; + m.reply({content:"DevMode disabled."}, false); + } + } + case "motd": + if (m.author.id == settings.botowner) { + if (!settings.motd.channels.contains(m.channel_id)) { + settings.motd.channels.push(m.channel_id); + m.reply({content:'MOTD has been enabled for <#${m.channel_id}>'}, false); + } else { + settings.motd.channels.remove(m.channel_id); + m.reply({content:'MOTD has been disabled for <#${m.channel_id}>'}, false); + } + } // System for WIP commands that only work in testing server case "wipcommand": if (m.guild_id == settings.devserver) {