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 missing json error codes #1096
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR! It has some issues tho. Some of errors codes (as it seems from the docs) shouldn't be really implemented, because they are accessible only by the users (there's a chance they were put into docs accidentally) and also you had a couple of typos.
structs.go
Outdated
ErrCodeInvalidOAuthState = 50012 | ||
ErrCodeMissingPermissions = 50013 | ||
ErrCodeInvalidAuthenticationToken = 50014 | ||
ErrCodeNoteTooLong = 50015 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was added by mistake to the docs, bots shouldn't be able to access notes at all.
structs.go
Outdated
ErrCodeCannotSelfRedeemThisGift = 50054 | ||
ErrCodeInvalidGuild = 50055 | ||
ErrCodeInvalidMessageType = 50068 | ||
ErrCodePaymentSourceRequiredToRedeemGift = 50070 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note my comment for ErrCodeNoteTooLong
structs.go
Outdated
ErrCodeCannotDeleteAChannelRequiredForCommunityGuilds = 50074 | ||
ErrCodeInvalidStickerSent = 50081 | ||
ErrCodePerformedOperationOnArchivedThread = 50083 | ||
ErrCodeInvalidThreadNotificationSettings = 50084 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note my comment for ErrCodeNoteTooLong
structs.go
Outdated
ErrCodeThisServerNeedsMoreBoostsToPerformThisAction = 50101 | ||
ErrCodeTheRequestBodyContainsInvalidJSON = 50109 | ||
|
||
ErrCodeTwoFactorRequiredForThisOperation = 60003 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note my comment for ErrCodeNoteTooLong
Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
Thank you for your contribution! |
* add missing json error codes * Update structs.go Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com> * Update structs.go Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com> * requested changes * Update structs.go Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com> * Update structs.go Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com> * formatting * add ErrCodeEmbedDisabled back Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
Added missing error codes from: https://discord.com/developers/docs/topics/opcodes-and-status-codes#json