-
Notifications
You must be signed in to change notification settings - Fork 827
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
HTTP 400 bad request on ChannelMessageSendEmbed with missing value #726
Comments
This isn't caused by the |
Good to know, should discordgo throw an error for blank values then? The API response is non-specific and doesn't really help solve the problem. |
The library in general doesn't really check for invalid inputs, as these can change over time on Discord's end and there generally isn't a ton of documentation on exactly what inputs are rejected and what aren't. The impetus of ensuring inputs are valid is generally left to the user in these scenarios, and setting a precedent otherwise would require a large shift in library code; I know it's not an ideal solution, but the general mission of the library is to be as low-level as possible. |
Remove omitempty from Name/value since the Discord API requires both to be submitted. Fixes: bwmarrin#726
Remove omitempty from Name/value since the Discord API requires both to be submitted. Fixes: #726
Remove omitempty from Name/value since the Discord API requires both to be submitted. Fixes: bwmarrin#726
Hi,
I'm seeing a discord API error while using
ChannelMessageSendEmbed
. The error is:error="HTTP 400 Bad Request, {\"embed\": [\"fields\"]}"
It seems like this is caused by an empty
value
key in theMessageEmbedField
struct.Value
is json tagged asomitempty
, would it make sense to remove this tag so the key is sent every time?The text was updated successfully, but these errors were encountered: