fix: regression from last commit

This commit is contained in:
2026-02-03 15:32:48 +01:00
parent d44c6f32aa
commit 21691724c2

View File

@@ -66,9 +66,17 @@ async def handle_at_everyone(message):
if spam_role: if spam_role:
try: try:
# Check if we can actually assign the role if spam_role not in message.author.roles:
await message.author.add_roles(spam_role, reason="Spam mention") # Check if we can actually assign the role
logger.info("Role added successfully") await message.author.add_roles(spam_role, reason="Spam mention")
# Add the user to the database
add_user_to_role(
message.author.id, SPAM_ROLE_ID, message.author.name
)
logger.info("Role added successfully")
else:
logger.info("User already has the spam role")
await message.reply( await message.reply(
f"Dink Donk! Time to ping everyone! {spam_role.mention}", f"Dink Donk! Time to ping everyone! {spam_role.mention}",