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

footer and author icon url not working - output shows it as iconUrl instead of icon_url #43

Closed
dan-dr opened this issue Oct 2, 2021 · 2 comments

Comments

@dan-dr
Copy link
Contributor

dan-dr commented Oct 2, 2021

// add author
embedBuilder.setAuthor(new EmbedAuthor("Author", "https://example.com/png.png", "https://example.com"));

// ... later after creating a message
webhookMessage.getBody().writeTo(buffer);
LOGGER.debug("getBody: " + buffer.readUtf8());

//in the output i see
"author":{"name":"Author","iconUrl":"https://example.com/png.png","url":"https://example.com"}

I believe that's what's sent to discord. it should be "icon_url", and so the icon isn't visible on my embed as a result.
Maybe a json library conflict?

@MinnDevelopment
Copy link
Owner

I think your issue is that you have a severely outdated version of the org.json dependency. This library needs at least 20190722 which added JSONPropertyName.

@dan-dr
Copy link
Contributor Author

dan-dr commented Oct 3, 2021

Correct

@dan-dr dan-dr closed this as completed Oct 3, 2021
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

No branches or pull requests

2 participants