I hereby decree that this document shall no longer contain the substring " == ", and hereafter shall be referred to as " === ". This amendment shall take effect immediately.
Signed-off-by: pineafan <pineapplefanyt@gmail.com>
diff --git a/src/commands/mod/kick.ts b/src/commands/mod/kick.ts
index eac7ca3..a0b9a97 100644
--- a/src/commands/mod/kick.ts
+++ b/src/commands/mod/kick.ts
@@ -103,7 +103,7 @@
if (dmd) await dm.delete()
return
}
- let failed = (dmd == false && notify)
+ let failed = (dmd === false && notify)
await interaction.editReply({embeds: [new EmojiEmbed()
.setEmoji(`PUNISH.KICK.${failed ? "YELLOW" : "GREEN"}`)
.setTitle(`Kick`)
@@ -124,20 +124,20 @@
let member = (interaction.member as GuildMember)
let me = (interaction.guild.me as GuildMember)
let apply = (interaction.options.getMember("user") as GuildMember)
- if (member == null || me == null || apply == null) throw "That member is not in the server"
+ if (member === null || me === null || apply === null) throw "That member is not in the server"
let memberPos = member.roles ? member.roles.highest.position : 0
let mePos = me.roles ? me.roles.highest.position : 0
let applyPos = apply.roles ? apply.roles.highest.position : 0
// Check if Nucleus can kick the member
if (! (mePos > applyPos)) throw "I do not have a role higher than that member"
// Check if Nucleus has permission to kick
- if (! me.permissions.has("KICK_MEMBERS")) throw "I do not have the Kick members permission";
+ if (! me.permissions.has("KICK_MEMBERS")) throw "I do not have the *Kick Members* permission";
// Do not allow kicking Nucleus
- if (member.id == interaction.guild.me.id) throw "I cannot kick myself"
+ if (member.id === interaction.guild.me.id) throw "I cannot kick myself"
// Allow the owner to kick anyone
- if (member.id == interaction.guild.ownerId) return true
+ if (member.id === interaction.guild.ownerId) return true
// Check if the user has kick_members permission
- if (! member.permissions.has("KICK_MEMBERS")) throw "You do not have the Kick members permission";
+ if (! member.permissions.has("KICK_MEMBERS")) throw "You do not have the *Kick Members* permission";
// Check if the user is below on the role list
if (! (memberPos > applyPos)) throw "You do not have a role higher than that member"
// Allow kick