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 missing json error codes #1096

Merged
merged 8 commits into from Feb 16, 2022
Merged

add missing json error codes #1096

merged 8 commits into from Feb 16, 2022

Conversation

phenpessoa
Copy link
Contributor

Copy link
Collaborator

@FedorLap2006 FedorLap2006 left a 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 Show resolved Hide resolved
structs.go Outdated Show resolved Hide resolved
structs.go Show resolved Hide resolved
structs.go Show resolved Hide resolved
structs.go Outdated
ErrCodeInvalidOAuthState = 50012
ErrCodeMissingPermissions = 50013
ErrCodeInvalidAuthenticationToken = 50014
ErrCodeNoteTooLong = 50015
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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 Show resolved Hide resolved
structs.go Outdated Show resolved Hide resolved
phenpessoa and others added 7 commits February 15, 2022 20:59
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>
@FedorLap2006
Copy link
Collaborator

Thank you for your contribution!

@FedorLap2006 FedorLap2006 merged commit 115adf2 into bwmarrin:master Feb 16, 2022
SmoothieNoIce pushed a commit to SmoothieNoIce/discordgo that referenced this pull request Feb 17, 2022
* 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>
@FedorLap2006 FedorLap2006 added this to the v0.24.0 milestone Feb 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants