|
@ -98,9 +98,15 @@ client.on("message", async message => { |
|
|
roleRequest(message); |
|
|
roleRequest(message); |
|
|
} else if (message.content.toLowerCase().startsWith(`${prefix}userswithrole`)) { |
|
|
} else if (message.content.toLowerCase().startsWith(`${prefix}userswithrole`)) { |
|
|
usersWithRole(message); |
|
|
usersWithRole(message); |
|
|
|
|
|
} else if (message.content.toLowerCase().startsWith(`${prefix}ban`)) { |
|
|
|
|
|
ban(message); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
async function ban() { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
async function helpMessage(message) { |
|
|
async function helpMessage(message) { |
|
|
const helpEmbed = new Discord.MessageEmbed() |
|
|
const helpEmbed = new Discord.MessageEmbed() |
|
|
.setTitle(`Helping \`${message.author.tag}\``) |
|
|
.setTitle(`Helping \`${message.author.tag}\``) |
|
@ -162,8 +168,6 @@ async function aboutServer(message) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
async function roleRequest(message) { |
|
|
async function roleRequest(message) { |
|
|
const roles = message.guild.roles.cache.filter(role => role.name.toLowerCase().includes(message.content.split(" ")[1])); |
|
|
|
|
|
let roleChannel; |
|
|
|
|
|
|
|
|
|
|
|
if (!message.content.split(" ")[1]) { |
|
|
if (!message.content.split(" ")[1]) { |
|
|
message.reply("query must contain at least 3 characters!") |
|
|
message.reply("query must contain at least 3 characters!") |
|
@ -175,6 +179,9 @@ async function roleRequest(message) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const roles = message.guild.roles.cache.filter(role => role.name.toLowerCase().includes(message.content.split(" ")[1])); |
|
|
|
|
|
let roleChannel; |
|
|
|
|
|
|
|
|
if (roles.array().length < 1) { |
|
|
if (roles.array().length < 1) { |
|
|
message.reply("no roles found with that name!"); |
|
|
message.reply("no roles found with that name!"); |
|
|
return; |
|
|
return; |
|
|