Skip to content

Commit 1c5f037

Browse files
committed
hotfix: repl guard if check
1 parent 0cc48a7 commit 1c5f037

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/v2/commands/repel/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,15 @@ export const repelInteraction: CommandDataWithHandler = {
120120
return;
121121
}
122122

123+
124+
if (targetMember.roles.cache.has(repelRole.id)) {
125+
await reply(
126+
interaction,
127+
`You cannot repel a user with the ${REPEL_ROLE_NAME} role.`,
128+
);
129+
return;
130+
}
131+
123132
const botMember = await interaction.guild.members.fetch(client.user!.id);
124133
const isOwner = interaction.guild.ownerId === member.id;
125134

0 commit comments

Comments
 (0)