discord-webhooks icon indicating copy to clipboard operation
discord-webhooks copied to clipboard

README JDA example uses MessageCreateData, but JDAWebhookClient only supports Message / MessageEmbed

Open Kamilake opened this issue 1 month ago • 1 comments

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 Message instead of MessageCreateData, or
  • Is there a missing overload for MessageCreateData that was planned but not implemented yet?

Thanks!

Kamilake avatar Nov 27 '25 06:11 Kamilake