Describe the bug
:: 06-19 17:54.24 :: ERROR :: client.py line 582 --- Ignoring exception in on_message
Traceback (most recent call last):
File "/bot/.venv/lib/python3.12/site-packages/discord/client.py", line 508, in _run_event
await coro(*args, **kwargs)
File "/bot/src/bot/cogs/moderation/admin_automod_spam_messages.py", line 166, in on_message
"file_name": message.attachments[0].filename
~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
Expected behavior
This error should not be thrown from the automod cog
To Reproduce
Spam with an attachment, I think.
How was the bot ran
Issue is in main already
Additional context
Logs from the production bot.
Describe the bug
Expected behavior
This error should not be thrown from the automod cog
To Reproduce
Spam with an attachment, I think.
How was the bot ran
Issue is in main already
Additional context
Logs from the production bot.