From d61aaadc230d18581df8b4d229466aa6ace78213 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Thu, 1 Apr 2021 23:20:19 -0500 Subject: [PATCH] Give wrong channel message if role is requested in wrong channel --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index af5ddb8..f3aefe3 100644 --- a/index.js +++ b/index.js @@ -124,6 +124,9 @@ async function roleRequest(message) { const writerRole = message.guild.roles.cache.get("826508727855087723"); const role = message.content.substring(13).toLowerCase(); const possibleRoles = ['spec', 'spectator', 'reader', 'writer']; + if (message.channel.id !== "826904255012667452") { + message.reply("wrong channel!") + } if (possibleRoles.indexOf(role) === -1) { message.reply("not a valid role!"); return;