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

403 Forbidden role reminders #204

Closed
MattyTheHacker opened this issue May 9, 2024 · 3 comments · Fixed by #226
Closed

403 Forbidden role reminders #204

MattyTheHacker opened this issue May 9, 2024 · 3 comments · Fixed by #226
Labels
bug Something isn't working

Comments

@MattyTheHacker
Copy link
Member

MattyTheHacker commented May 9, 2024

image

This issue is present in the get role reminders but it also occurs to me it could pop up in other areas too.

Because it's not possible to check if a user has blocked the bot, or disabled DMs, we should have a unified way to handle the error of not being able to send a message to a user

@CarrotManMatt CarrotManMatt added the bug Something isn't working label May 9, 2024
@CarrotManMatt
Copy link
Member

a user has blocked the bot, or disabled DMs

Is that the leading theory on why the forbidden error is occurring?

@MattyTheHacker
Copy link
Member Author

a user has blocked the bot, or disabled DMs

Is that the leading theory on why the forbidden error is occurring?

I can't say for certain but that's the only thing I can think of - everything else that it could be is being checked for in one way or another already so that's my guess

@CarrotManMatt
Copy link
Member

Sure, a good theory as any. A try-except would then be suitable for this situation as there is no way to check for these conditions (See this StackOverflow post).

However, I think it is essential that we only except for a ForbiddenError and perform an additional check to attempt to guess why that error was raised. If it was raised because of one of the mentioned conditions then a log message should be sent and the loop should continue to the next member, otherwise the error should continue to be raised if the reasoning for it was not known. This will help with future debugging if issues occur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants