Skip to content

Commit 82f31c6

Browse files
committed
fix zookeep permission checking part 2
1 parent 7d44bc1 commit 82f31c6

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/modules/moderation/zookeep.command.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,17 @@ export const ZookeepCommand: Command<ApplicationCommandType.User> = {
6565
return;
6666
}
6767

68+
const interactionMember = await interaction.guild.members.fetch(
69+
interaction.user.id,
70+
);
71+
if (member.roles.highest >= interactionMember.roles.highest) {
72+
await interaction.reply({
73+
content: `You cannot send ${actualMention(user)} to the zoo because they have an equal or higher role than you.`,
74+
flags: "Ephemeral",
75+
});
76+
return;
77+
}
78+
6879
if (member.roles.cache.has(config.roles.zooExhibit)) {
6980
await interaction.reply({
7081
content: `${actualMention(user)} is already in the zoo!`,

0 commit comments

Comments
 (0)