Bot-detector / bot-detector-discord-bot

It's NOT a bot. That would be quite hypocritical, wouldn't it?
5 stars 11 forks source link

Add descriptive error message for disabled PMs #221

Closed extreme4all closed 9 months ago

extreme4all commented 9 months ago

Currently, if a user's PMs are disabled, and they attempt to run a command that PMs them, they receive a generic An error occurred message. This PR adds a more descriptive message for when a PM fails, to prevent confusion.

This is implemented for rsn_linking_commands only, as it's the only place that PMs are used. Handling it in the global error handler should be possible, but may be more complex than necessary as the discord.Forbidden error (raised when PMs fail) is generic, and also used for other instances where permissions are missing.