-
Notifications
You must be signed in to change notification settings - Fork 6
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
Properly handle error when a user is blocking the bot from sending a private message #3
Comments
Error message:
|
This is a bit more tedious than expected... When a user runs a command and the bot does not have permission to message that user, the BUT, if an event is the reason an error occurs, a completely different error is thrown, which is completely out of scope of the commands extension errors because it wasn't sourced from the issuing of a command sigh This second case is the more important one which occurs more frequently. I need to split this up so I can chip away at it. |
The latest related commit handles the case where a user issues a command, but the bot lacks permissions to message them. To resolve this issue I need to handle the case where an event occurs (a user joining the guild) and the bot lacks permissions to message them. |
If I'm understanding how this works correctly, you, could run something like that prior to attempting to send the message. If it returns that their DMs are open, send the message, otherwise, either don't even try, or send a message in a channel and mention them instead. You were talking about sending some sort of survey. This could be relevant to that too. |
Looks like the solution. This hasn't been a pressing issue and will take a deep dive to review the number of areas effected. |
As per the title, there are cases when a user has settings which prevent the bot from sending them a private message. This error should be handled in dictator.py along with other error handling which will trigger the bot to tag the user and alert them of the problem in the bot topic channel.
The text was updated successfully, but these errors were encountered: