discord-webhooks
discord-webhooks copied to clipboard
README JDA example uses MessageCreateData, but JDAWebhookClient only supports Message / MessageEmbed
I noticed that the JDA example in the README seems to be out of sync with the actual API of JDAWebhookClient.
In the README:
public void sendWebhook(Webhook webhook) {
MessageCreateData message = new MessageCreateBuilder().setContent("Hello World").build();
try (JDAWebhookClient client = JDAWebhookClient.from(webhook)) {
client.send(message); // send a JDA message instance
}
}
However, the current JDAWebhookClient API only has these send overloads:
CompletableFuture<ReadonlyMessage> send(net.dv8tion.jda.api.entities.Message message);
CompletableFuture<ReadonlyMessage> send(net.dv8tion.jda.api.entities.MessageEmbed embed);
There is no send(MessageCreateData) overload, so the README example does not compile with the latest release.
Could you clarify what the intended usage is?
- Should the README be updated to use
Messageinstead ofMessageCreateData, or - Is there a missing overload for
MessageCreateDatathat was planned but not implemented yet?
Thanks!