Browse Source

Merge branch 'master' of adawesome.tech:git/bots/awesomemod

master
Abheek Dhawan 4 years ago
parent
commit
2844f32580
  1. 6
      bot.js

6
bot.js

@ -864,12 +864,12 @@ async function usersWith(message) {
message.reply("query must contain at least 3 characters!") message.reply("query must contain at least 3 characters!")
return; return;
} }
if (message.content.split(" ")[1].length < 3) { const queriedRole = message.content.split(" ");
queriedRole.shift();
if (queriedRole.join(" ").length < 3) {
message.reply("query must contain at least 3 characters!") message.reply("query must contain at least 3 characters!")
return; return;
} }
const queriedRole = message.content.split(" ");
queriedRole.shift();
const roles = message.guild.roles.cache.filter(role => role.name.toLowerCase().includes(queriedRole.join(" ").toLowerCase())); const roles = message.guild.roles.cache.filter(role => role.name.toLowerCase().includes(queriedRole.join(" ").toLowerCase()));
if (!roles.array().length) { if (!roles.array().length) {
message.reply("no roles found with that name!"); message.reply("no roles found with that name!");

Loading…
Cancel
Save