open source!
diff --git a/src/commands/mod/mute.ts b/src/commands/mod/mute.ts
index 3d6d912..2942844 100644
--- a/src/commands/mod/mute.ts
+++ b/src/commands/mod/mute.ts
@@ -227,13 +227,13 @@
// Check if Nucleus has permission to mute
if (! interaction.guild.me.permissions.has("MODERATE_MEMBERS")) throw "I do not have the `moderate_members` permission";
// Do not allow the user to have admin or be the owner
- if ((interaction.options.getMember("user") as GuildMember).permissions.has("ADMINISTRATOR") || (interaction.options.getMember("user") as GuildMember).id == interaction.guild.ownerId) throw "You cannot mute an admin or the owner"
+ if (apply.permissions.has("ADMINISTRATOR") || apply.id == interaction.guild.ownerId) throw "You cannot mute an admin or the owner"
// Do not allow muting Nucleus
- if ((interaction.member as GuildMember).id == interaction.guild.me.id) throw "I cannot mute myself"
+ if (member.id == interaction.guild.me.id) throw "I cannot mute myself"
// Allow the owner to mute anyone
- if ((interaction.member as GuildMember).id == interaction.guild.ownerId) return true
+ if (member.id == interaction.guild.ownerId) return true
// Check if the user has moderate_members permission
- if (! (interaction.member as GuildMember).permissions.has("MODERATE_MEMBERS")) throw "You do not have the `moderate_members` permission";
+ if (! member.permissions.has("MODERATE_MEMBERS")) throw "You do not have the `moderate_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 mute