.then(emoji=>message.reply(`created new emoji "${emoji.name}"`))
.then(emoji=>message.reply(`Created new emoji "${emoji.name}"`))
.catch(error=>message.reply(error));
.catch(message.reply(newDiscord.MessageEmbed().setDescription("There seems to have been an error! Likely, the file size is too large. Please try the command with a file that is less than 256 KB.").setColor("fda172")));
}else{
}else{
message.reply("the format should be `$addEmoji [URL] [name]`");
message.reply("The format should be `$addEmoji [URL] [name]`");
message.reply("you do not have adequate permissions!")
message.reply("You do not have adequate permissions!")
return;
return;
}
}
if(!message.content.split(" ")[1]){
if(!message.content.split(" ")[1]){
message.reply("role query must contain at least 3 characters!")
message.reply("Role query must contain at least 3 characters!")
return;
return;
}
}
if(message.content.split(" ")[1].length<3){
if(message.content.split(" ")[1].length<3){
message.reply("role query must contain at least 3 characters!")
message.reply("Role query must contain at least 3 characters!")
return;
return;
}
}
@ -645,17 +645,17 @@ async function addRole(message) {
letroleChannel;
letroleChannel;
if(!message.content.split(" ")[2]){
if(!message.content.split(" ")[2]){
message.reply("user query must contain at least 3 characters!")
message.reply("User query must contain at least 3 characters!")
return;
return;
}
}
if(message.content.split(" ")[2].length<3){
if(message.content.split(" ")[2].length<3){
message.reply("user query must contain at least 3 characters!")
message.reply("User query must contain at least 3 characters!")
return;
return;
}
}
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;
}
}
@ -671,7 +671,7 @@ async function addRole(message) {
});
});
if(members.array().length<1){
if(members.array().length<1){
message.reply("no members found with that name!");
message.reply("No members found with that name!");
return;
return;
}
}
@ -701,7 +701,7 @@ async function addRole(message) {
if(reaction.emoji.name==='anim_check'){
if(reaction.emoji.name==='anim_check'){
member.roles.add(role).then(message.reply(`${member.user} has been given the **${role}** role!`)).catch(()=>{message.reply("It seems I don't have permissions to give that role, as it's likely above me :(")});
member.roles.add(role).then(message.reply(`${member.user} has been given the **${role}** role!`)).catch(()=>{message.reply("It seems I don't have permissions to give that role, as it's likely above me :(")});
}else{
}else{
message.reply("I guess you won't be giving that role!");
message.reply("It seems you won't be giving that role!");
}
}
}).catch(console.error);
}).catch(console.error);
}).catch(console.error);
}).catch(console.error);
@ -709,17 +709,17 @@ async function addRole(message) {
message.guild.members.ban(member.user).then(user=>message.reply(`<@${user.id}> has been banned!`)).catch(()=>message.channel.send(`Unfortunately, I don't have the ability to ban ${member.user.username}, likely because their role is higher than mine.`));
message.guild.members.ban(member.user).then(user=>message.reply(`<@${user.id}> has been banned!`)).catch(()=>message.channel.send(`Unfortunately, I don't have the ability to ban ${member.user.username}, likely because their role is higher than mine.`));
}else{
}else{
message.reply(`phew! ${member}'s safe!`);
message.reply(`Phew! ${member}'s safe!`);
}
}
}).catch(console.error);
}).catch(console.error);
}).catch(console.error);
}).catch(console.error);
@ -783,17 +783,17 @@ async function ban(message) {
message.reply('you do not have admin privileges!')
message.reply('You do not have admin privileges!')
return;
return;
}
}
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!")
return;
return;
}
}
if(message.content.split(" ")[1].length<3){
if(message.content.split(" ")[1].length<3){
message.reply("query must contain at least 3 characters!")
message.reply("Query must contain at least 3 characters!")
return;
return;
}
}
@ -814,14 +814,14 @@ async function kick(message) {
});
});
if(members.array().length<1){
if(members.array().length<1){
message.reply("no members found with that name!");
message.reply("No members found with that name!");
return;
return;
}
}
constmember=members.array()[0];
constmember=members.array()[0];
if(member===message.member){
if(member===message.member){
message.reply("you can't kick yourself!");
message.reply("You can't kick yourself!");
return;
return;
}
}
@ -845,7 +845,7 @@ async function kick(message) {
if(reaction.emoji.name==='anim_check'){
if(reaction.emoji.name==='anim_check'){
member.kick().then(user=>message.reply(`<@${user.id}> has been kicked!`)).catch(()=>message.channel.send(`Unfortunately, I don't have the ability to kick ${member.user.username}, likely because their role is higher than mine.`));
member.kick().then(user=>message.reply(`<@${user.id}> has been kicked!`)).catch(()=>message.channel.send(`Unfortunately, I don't have the ability to kick ${member.user.username}, likely because their role is higher than mine.`));
}else{
}else{
message.reply(`phew! ${member}'s safe!`);
message.reply(`Phew! ${member}'s safe!`);
}
}
}).catch(console.error);
}).catch(console.error);
}).catch(console.error);
}).catch(console.error);
@ -871,18 +871,18 @@ async function helpMessage(message, prefix) {
asyncfunctionusersWith(message){
asyncfunctionusersWith(message){
constthreshold=20;
constthreshold=20;
if(message.content.split(" ").length<2){
if(message.content.split(" ").length<2){
message.reply("query must contain at least 3 characters!")
message.reply("Query must contain at least 3 characters!")
return;
return;
}
}
constqueriedRole=message.content.split(" ");
constqueriedRole=message.content.split(" ");
queriedRole.shift();
queriedRole.shift();
if(queriedRole.join(" ").length<3){
if(queriedRole.join(" ").length<3){
message.reply("query must contain at least 3 characters!")
message.reply("Query must contain at least 3 characters!")
@ -989,12 +989,12 @@ async function aboutServer(message) {
asyncfunctionroleRequest(message){
asyncfunctionroleRequest(message){
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!")
return;
return;
}
}
if(message.content.split(" ")[1].length<3){
if(message.content.split(" ")[1].length<3){
message.reply("query must contain at least 3 characters!")
message.reply("Query must contain at least 3 characters!")
return;
return;
}
}
@ -1004,7 +1004,7 @@ async function roleRequest(message) {
letroleChannel;
letroleChannel;
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;
}
}
@ -1012,7 +1012,7 @@ async function roleRequest(message) {
constrole=sortedRoles[0];
constrole=sortedRoles[0];
if(message.member.roles.cache.has(role.id)){
if(message.member.roles.cache.has(role.id)){
message.reply("you already have that role!");
message.reply("You already have that role!");
return;
return;
}
}
@ -1033,9 +1033,9 @@ async function roleRequest(message) {
.then(userReaction=>{
.then(userReaction=>{
constreaction=userReaction.first();
constreaction=userReaction.first();
if(reaction.emoji.name==='anim_check'){
if(reaction.emoji.name==='anim_check'){
message.member.roles.add(role).then(message.reply("wow I guess you ARE worthy! ||mods must be real mistaken||")).catch(()=>{message.reply("It seems I don't have permissions to give that role, as it's likely above me :(")});
message.member.roles.add(role).then(message.reply("Wow I guess you ARE worthy! ||mods must be real mistaken||")).catch(()=>{message.reply("It seems I don't have permissions to give that role, as it's likely above me :(")});
}else{
}else{
message.reply("I guess you won't be getting that role!");
message.reply("It seems you won't be getting that role!");
}
}
}).catch(console.error);
}).catch(console.error);
}).catch(console.error);
}).catch(console.error);
@ -1043,23 +1043,23 @@ async function roleRequest(message) {