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

Add raw data to 'DiscordAPIError' #5032

Closed
antoine-pous opened this issue Nov 22, 2020 · 1 comment
Closed

Add raw data to 'DiscordAPIError' #5032

antoine-pous opened this issue Nov 22, 2020 · 1 comment

Comments

@antoine-pous
Copy link

Is your feature request related to a problem? Please describe.
Actually DiscordAPIError lack of the original payload submitted (excluding sensitive data). Including them will allow us to perform actions on specific errors depending of the context which would be incredibly useful.

Describe the ideal solution
The solution would simply to add the raw payload and letting us dealing with it if we want

Additional context
Start a bot, block him and request an action which send PM. The bot will encounter a 403 error from Discord APIs, with the raw payload we can make a generic system on top of our app painless to notify the user that the bot is blocked by the dest where the command was sent from.

There's a lot of use cases where having the raw payload would be incredibly useful, maybe you should consider adding an option during the client instantiation to don't add the payload by default on all DiscordAPIError.

@SpaceEEC
Copy link
Member

This has been implemented with #5701 🎉

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants