public class JDAWebhookClient extends WebhookClient
WebhookClient.BucketallowedMentions, bucket, client, defaultTimeout, id, isQueued, isShutdown, parseMessage, pool, queue, url, USER_AGENT, WEBHOOK_URL| Constructor and Description |
|---|
JDAWebhookClient(long id,
java.lang.String token,
boolean parseMessage,
okhttp3.OkHttpClient client,
java.util.concurrent.ScheduledExecutorService pool,
AllowedMentions mentions) |
| Modifier and Type | Method and Description |
|---|---|
@NotNull java.util.concurrent.CompletableFuture<ReadonlyMessage> |
edit(long messageId,
net.dv8tion.jda.api.entities.Message message)
Edits the target message with the provided
Message to the webhook. |
@NotNull java.util.concurrent.CompletableFuture<ReadonlyMessage> |
edit(long messageId,
net.dv8tion.jda.api.entities.MessageEmbed embed)
Edits the target message with the provided
MessageEmbed to the webhook. |
static @NotNull WebhookClient |
fromJDA(net.dv8tion.jda.api.entities.Webhook webhook)
Creates a WebhookClient for the provided webhook.
|
@NotNull java.util.concurrent.CompletableFuture<ReadonlyMessage> |
send(net.dv8tion.jda.api.entities.Message message)
Sends the provided
Message to the webhook. |
@NotNull java.util.concurrent.CompletableFuture<ReadonlyMessage> |
send(net.dv8tion.jda.api.entities.MessageEmbed embed)
Sends the provided
MessageEmbed to the webhook. |
backoffQueue, checkShutdown, close, delete, drainQueue, edit, edit, edit, edit, execute, execute, failure, getId, getTimeout, getUrl, isShutdown, isWait, newBody, newRequest, queueRequest, send, send, send, send, send, send, send, send, setTimeout, withId, withUrlpublic JDAWebhookClient(long id,
java.lang.String token,
boolean parseMessage,
okhttp3.OkHttpClient client,
java.util.concurrent.ScheduledExecutorService pool,
AllowedMentions mentions)
@NotNull public static @NotNull WebhookClient fromJDA(@NotNull net.dv8tion.jda.api.entities.Webhook webhook)
webhook - The webhookjava.lang.NullPointerException - If the webhook is null or does not provide a token@NotNull public @NotNull java.util.concurrent.CompletableFuture<ReadonlyMessage> send(@NotNull net.dv8tion.jda.api.entities.Message message)
Message to the webhook.message - The message to sendCompletableFuturejava.lang.NullPointerException - If null is providedWebhookClient.isWait(),
WebhookMessageBuilder.fromJDA(Message)@NotNull public @NotNull java.util.concurrent.CompletableFuture<ReadonlyMessage> send(@NotNull net.dv8tion.jda.api.entities.MessageEmbed embed)
MessageEmbed to the webhook.embed - The embed to sendCompletableFuturejava.lang.NullPointerException - If null is providedWebhookClient.isWait(),
WebhookEmbedBuilder.fromJDA(net.dv8tion.jda.api.entities.MessageEmbed)@NotNull public @NotNull java.util.concurrent.CompletableFuture<ReadonlyMessage> edit(long messageId, @NotNull net.dv8tion.jda.api.entities.Message message)
Message to the webhook.messageId - The target message idmessage - The message to sendCompletableFuturejava.lang.NullPointerException - If null is providedWebhookClient.isWait(),
WebhookMessageBuilder.fromJDA(Message)@NotNull public @NotNull java.util.concurrent.CompletableFuture<ReadonlyMessage> edit(long messageId, @NotNull net.dv8tion.jda.api.entities.MessageEmbed embed)
MessageEmbed to the webhook.messageId - The target message idembed - The embed to sendCompletableFuturejava.lang.NullPointerException - If null is providedWebhookClient.isWait(),
WebhookEmbedBuilder.fromJDA(net.dv8tion.jda.api.entities.MessageEmbed)