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

Implement MessageSendForbidden error and handling #247

Closed
wants to merge 6 commits into from

Conversation

MattyTheHacker
Copy link
Member

No description provided.

@MattyTheHacker MattyTheHacker linked an issue Jul 5, 2024 that may be closed by this pull request
@MattyTheHacker MattyTheHacker self-assigned this Jul 5, 2024
@CarrotManMatt CarrotManMatt added bug Something isn't working refactor Improvements to the codebase that do not directly affect users labels Jul 5, 2024
@MattyTheHacker MattyTheHacker marked this pull request as ready for review July 8, 2024 13:55
Copy link
Member

@CarrotManMatt CarrotManMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the approach taken here, however have 2 main changes that need to be made (before I make comments on specific formatting changes).

  1. The error capture decorators are used for any interactions that do not have exceptions captured by default (I.e. tasks & event listeners need exceptions capturing, whereas commands have exceptions captured by the on_application_command_error event listener). Therefore handling of capturing the MessageSendForbiddenError should be performed by the decorators for the tasks & event listeners as it is now, but also is required within the command error handler.
    TL;DR: handle MessageSendForbiddenError within on_application_command_error event listener.

  2. The current error capture decorators use the capture_error_and_close() function. This should be refactored to determine whether TeX-Bot actually needs closing on a per-decorator basis. The capture_guild_does_not_exist_error & capture_strike_tracking_error decorators should close TeX-Bot, whereas capture_message_send_forbidden_error decorator shouldn't.

…forbidden-when-sending-messages

# Conflicts:
#	cogs/strike.py
@MattyTheHacker MattyTheHacker removed their assignment Jul 12, 2024
@MattyTheHacker
Copy link
Member Author

not a clue how to do any of that 🫡

@CarrotManMatt CarrotManMatt deleted the 246-403-forbidden-when-sending-messages branch July 27, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working refactor Improvements to the codebase that do not directly affect users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

403 Forbidden when sending messages to user after strike ban
2 participants