Browse Source

Give wrong channel message if role is requested in wrong channel

master
Abheek Dhawan 4 years ago
parent
commit
d61aaadc23
  1. 3
      index.js

3
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;

Loading…
Cancel
Save