Skip to content

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

@Kamilake

Description

@Kamilake

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions