mirror of
https://github.com/alterware/aw-bot.git
synced 2026-02-11 01:03:04 +00:00
fix: regression from last commit
This commit is contained in:
@@ -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}",
|
||||||
|
|||||||
Reference in New Issue
Block a user