pull/11/head
TheCodedProf 3 years ago
parent 46518a4bb5
commit 0941da4929

@ -182,8 +182,7 @@ export async function callback(interaction: CommandInteraction | ButtonInteracti
`**${currentPageData.name}**\n` +
`> ${currentPageData.description}\n\n` +
(currentPageData.min === currentPageData.max ? `Select ${addPlural(currentPageData.min, "role")}` :
`Select between ${currentPageData.min} and ${currentPageData.max} roles` + (
currentPageData.min === 0 ? ` or press next` : "")) + "\n\n" +
`Select between ${currentPageData.min} and ${currentPageData.max} roles then press next`) + "\n\n" +
createPageIndicator(maxPage, page)
)
.setStatus("Success")

@ -185,7 +185,7 @@ const check = async (interaction: CommandInteraction, partial: boolean = false)
// Do not allow banning the owner
if (member.id === interaction.guild.ownerId) return "You cannot ban the owner of the server";
// Check if Nucleus can ban the member
if (!(mePos > applyPos)) return "I do not have a role higher than that member";
if (!(mePos > applyPos)) return `I do not have a role higher than <@${apply.id}>`;
// Check if Nucleus has permission to ban
if (!me.permissions.has("BanMembers")) return "I do not have the *Ban Members* permission";
// Do not allow banning Nucleus
@ -193,7 +193,7 @@ const check = async (interaction: CommandInteraction, partial: boolean = false)
// Allow the owner to ban anyone
if (member.id === interaction.guild.ownerId) return true;
// Check if the user is below on the role list
if (!(memberPos > applyPos)) return "You do not have a role higher than that member";
if (!(memberPos > applyPos)) return `You do not have a role higher than <@${apply.id}>`;
// Allow ban
return true;
};

@ -187,11 +187,11 @@ const check = (interaction: CommandInteraction, partial: boolean = false) => {
// Do not allow kicking the owner
if (member.id === interaction.guild.ownerId) return "You cannot kick the owner of the server";
// Check if Nucleus can kick the member
if (!(mePos > applyPos)) return "I do not have a role higher than that member";
if (!(mePos > applyPos)) return `I do not have a role higher than <@${apply.id}>`;
// Do not allow kicking Nucleus
if (member.id === interaction.guild.members.me!.id) return "I cannot kick myself";
// Check if the user is below on the role list
if (!(memberPos > applyPos)) return "You do not have a role higher than that member";
if (!(memberPos > applyPos)) return `You do not have a role higher than <@${apply.id}>`;
// Allow kick
return true;
};

@ -375,7 +375,7 @@ const check = async (interaction: CommandInteraction, partial: boolean = false)
// Do not allow muting the owner
if (member.id === interaction.guild.ownerId) return "You cannot mute the owner of the server";
// Check if Nucleus can mute the member
if (!(mePos > applyPos)) return "I do not have a role higher than that member";
if (!(mePos > applyPos)) return `I do not have a role higher than <@${apply.id}>`;
// Check if Nucleus has permission to mute
if (!me.permissions.has("ModerateMembers")) return "I do not have the *Moderate Members* permission";
// Do not allow muting Nucleus
@ -383,7 +383,7 @@ const check = async (interaction: CommandInteraction, partial: boolean = false)
// Allow the owner to mute anyone
if (member.id === interaction.guild.ownerId) return true;
// Check if the user is below on the role list
if (!(memberPos > applyPos)) return "You do not have a role higher than that member";
if (!(memberPos > applyPos)) return `You do not have a role higher than <@${apply.id}>`;
// Allow mute
return true;
};

@ -203,7 +203,7 @@ const check = async (interaction: CommandInteraction, partial: boolean = false)
// Do not allow any changing of the owner
if (member.id === interaction.guild.ownerId) return "You cannot change the owner's nickname";
// Check if Nucleus can change the nickname
if (!(mePos > applyPos)) return "I do not have a role higher than that member";
if (!(mePos > applyPos)) return `I do not have a role higher than <@${apply.id}>`;
// Check if Nucleus has permission to change the nickname
if (!me.permissions.has("ManageNicknames")) return "I do not have the *Manage Nicknames* permission";
// Allow the owner to change anyone's nickname
@ -211,7 +211,7 @@ const check = async (interaction: CommandInteraction, partial: boolean = false)
// Allow changing your own nickname
if (member === apply) return true;
// Check if the user is below on the role list
if (!(memberPos > applyPos)) return "You do not have a role higher than that member";
if (!(memberPos > applyPos)) return `You do not have a role higher than <@${apply.id}>`;
// Allow change
return true;
};

@ -187,7 +187,7 @@ const check = async (interaction: CommandInteraction, partial: boolean = false)
// Do not allow banning the owner
if (member.id === interaction.guild.ownerId) return "You cannot softban the owner of the server";
// Check if Nucleus can ban the member
if (!(mePos > applyPos)) return "I do not have a role higher than that member";
if (!(mePos > applyPos)) return `I do not have a role higher than <@${apply.id}>`;
// Check if Nucleus has permission to ban
if (!me.permissions.has("BanMembers")) return "I do not have the *Ban Members* permission";
// Do not allow banning Nucleus
@ -195,7 +195,7 @@ const check = async (interaction: CommandInteraction, partial: boolean = false)
// Allow the owner to ban anyone
if (member.id === interaction.guild.ownerId) return true;
// Check if the user is below on the role list
if (!(memberPos > applyPos)) return "You do not have a role higher than that member";
if (!(memberPos > applyPos)) return `You do not have a role higher than <@${apply.id}>`;
// Allow ban
return true;
};

@ -146,13 +146,13 @@ const check = (interaction: CommandInteraction, partial: boolean = false) => {
// Do not allow unmuting the owner
if (member.id === interaction.guild.ownerId) return "You cannot unmute the owner of the server";
// Check if Nucleus can unmute the member
if (!(mePos > applyPos)) return "I do not have a role higher than that member";
if (!(mePos > applyPos)) return `I do not have a role higher than <@${apply.id}>`;
// Check if Nucleus has permission to unmute
if (!me.permissions.has("ModerateMembers")) return "I do not have the *Moderate Members* permission";
// Allow the owner to unmute anyone
if (member.id === interaction.guild.ownerId) return true;
// Check if the user is below on the role list
if (!(memberPos > applyPos)) return "You do not have a role higher than that member";
if (!(memberPos > applyPos)) return `You do not have a role higher than <@${apply.id}>`;
// Allow unmute
return true;
};

@ -291,7 +291,7 @@ const check = (interaction: CommandInteraction, partial: boolean = false) => {
if (member.id === interaction.guild.ownerId) return true;
// Check if the user has moderate_members permission
// Check if the user is below on the role list
if (!(memberPos > applyPos)) return "You do not have a role higher than that member";
if (!(memberPos > applyPos)) return `You do not have a role higher than <@${apply.id}>`;
// Allow warn
return true;
};

@ -129,7 +129,7 @@ export default async (guild: Guild, interaction?: CommandInteraction) => {
.setDescription(
"Nucleus has a content scanning system that automatically scans links and images sent by users.\n" +
"The staff team can be notified when an NSFW image is detected, or malicious links are sent.\n" +
`You can check and manage what to moderate in ${getCommandMentionByName("settings/filters")}`
`You can check and manage what to moderate in ${getCommandMentionByName("settings/automod")}`
)
.setEmoji("MOD.IMAGES.TOOSMALL")
.setStatus("Danger")

Loading…
Cancel
Save