Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG - Invite spam crashes when invite is in DM #309

Open
Xarlos89 opened this issue Nov 29, 2023 · 0 comments
Open

BUG - Invite spam crashes when invite is in DM #309

Xarlos89 opened this issue Nov 29, 2023 · 0 comments
Assignees
Labels
BUG Something isn't working EASY Easy issues

Comments

@Xarlos89
Copy link
Collaborator

Xarlos89 commented Nov 29, 2023

Ignoring exception in on_message
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/discord/client.py", line 378, in _run_event
    await coro(*args, **kwargs)
  File "/usr/local/lib/python3.11/site-packages/zorak/cogs/admin/moderation_invites.py", line 92, in on_message
    await logs_channel.send(embed=log_message(message))
                                  ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/zorak/cogs/admin/moderation_invites.py", line 54, in log_message
    description=f"Posted by {arg_message.author}\nIn {arg_message.channel.mention}",
                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DMChannel' object has no attribute 'mention'

Error appears to happen when invite spam hits the DM channel of the bot and the user. We should handle this more gracefully

@Xarlos89 Xarlos89 converted this from a draft issue Nov 29, 2023
@Xarlos89 Xarlos89 added BUG Something isn't working EASY Easy issues ZORAKATHON labels Nov 29, 2023
@Xarlos89 Xarlos89 self-assigned this Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working EASY Easy issues
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant