An experimental fork of Discord.Net that implements the newest discord features for testing and development to eventually get merged into Discord.Net
156
stars
42
forks
source link
Implement Better Discord Errors #291
Closed
quinchs closed 2 years ago
Summary
This PR implements parsing of the JSON error messages received by discord, it also deprecates
ApplicationCommandException
as this is no longer needed.This PR makes major changes to the
HttpException
including:Error
toErrors
and changing the type of it toIReadOnlyCollection<DiscordJsonError>
.DiscordCode
fromint?
toDiscordErrorCode
The
DiscordErrorCode
enum is kept up to date with the Official docs, it contains all the error codes and is parsed thru the request bucket.The
DiscordJsonError
class contains a path of the json as well as a string message and code that tells the executer what went wrong with the request.