Skip to content

Commit

Permalink
Oopsie
Browse files Browse the repository at this point in the history
  • Loading branch information
maddymeows committed Apr 25, 2024
1 parent 7c5a03e commit ef79260
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/commands/ReactionRoleCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,15 @@ export class ReactionRoleCommand extends Subcommand {
return
}

for (const memberRole of interaction.member.roles) {
if (role.comparePositionTo(memberRole) >= 0) {
await interaction.editReply({
content: "This role is higher than your current highest role.",
})
return
}
}

await message.react(emoji)
if (message.channel instanceof ThreadChannel && message.channel.joinable) {
await message.channel.join()
Expand Down

0 comments on commit ef79260

Please sign in to comment.