Skip to content

Commit

Permalink
Make it possible to mention the user who got their invite blocked
Browse files Browse the repository at this point in the history
  • Loading branch information
Beguwula authored Jun 21, 2024
1 parent 5716020 commit 62dc8ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async def on_message(message):
# Check if the message is in an allowed channel
allowed_channels = config.get("INVITEBLOCKER_ALLOWED_CHANNELS")
allowed_roles = config.get("INVITEBLOCKER_ALLOWED_ROLES")
blockedInviteMessage = config.get("INVITEBLOCKER_MESSAGE")
blockedInviteMessage = config.get("INVITEBLOCKER_MESSAGE").format(mention=member.mention)
whitelisted = any(role.id in allowed_roles for role in message.author.roles)

if message.channel.id not in allowed_channels and not whitelisted:
Expand Down

0 comments on commit 62dc8ac

Please sign in to comment.