Browse Source

Add return for wrong channel

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

3
index.js

@ -125,7 +125,8 @@ async function roleRequest(message) {
const role = message.content.substring(13).toLowerCase(); const role = message.content.substring(13).toLowerCase();
const possibleRoles = ['spec', 'spectator', 'reader', 'writer']; const possibleRoles = ['spec', 'spectator', 'reader', 'writer'];
if (message.channel.id !== "826904255012667452") { if (message.channel.id !== "826904255012667452") {
message.reply("wrong channel!") message.reply("wrong channel!");
return;
} }
if (possibleRoles.indexOf(role) === -1) { if (possibleRoles.indexOf(role) === -1) {
message.reply("not a valid role!"); message.reply("not a valid role!");

Loading…
Cancel
Save