From 22c0544d0948e75df8cc719b051a77a0a2f464e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Thu, 9 Sep 2021 18:53:46 +0300 Subject: [PATCH] Add maintenance mode check in play command --- src/client/commands/play.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/client/commands/play.js b/src/client/commands/play.js index 661a081..cdbd6b4 100644 --- a/src/client/commands/play.js +++ b/src/client/commands/play.js @@ -14,6 +14,15 @@ module.exports = { category: "radio", async execute(interaction, client) { let message = {}; + + if(client.config.maintenance){ + interaction.reply({ + content: client.messageEmojis["error"] + client.messages.maintenance, + ephemeral: true + }); + return false; + } + if(!client.stations) { message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild); return interaction.reply({