public class JavacordWebhookClient extends WebhookClient
WebhookClient.BucketallowedMentions, bucket, client, defaultTimeout, id, isQueued, isShutdown, parseMessage, pool, queue, url, USER_AGENT, WEBHOOK_URL| Constructor and Description |
|---|
JavacordWebhookClient(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,
org.javacord.api.entity.message.embed.Embed embed)
Edits the target message with the provided
Embed to the webhook. |
@NotNull java.util.concurrent.CompletableFuture<ReadonlyMessage> |
edit(long messageId,
org.javacord.api.entity.message.Message message)
Edits the target message with the provided
Message to the webhook. |
static @NotNull WebhookClient |
from(org.javacord.api.entity.webhook.Webhook webhook)
Creates a WebhookClient for the provided webhook.
|
@NotNull java.util.concurrent.CompletableFuture<ReadonlyMessage> |
send(org.javacord.api.entity.message.embed.Embed embed)
Sends the provided
Embed to the webhook. |
@NotNull java.util.concurrent.CompletableFuture<ReadonlyMessage> |
send(org.javacord.api.entity.message.Message message)
Sends the provided
Message 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 JavacordWebhookClient(long id,
java.lang.String token,
boolean parseMessage,
okhttp3.OkHttpClient client,
java.util.concurrent.ScheduledExecutorService pool,
AllowedMentions mentions)
@NotNull public static @NotNull WebhookClient from(@NotNull org.javacord.api.entity.webhook.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 org.javacord.api.entity.message.Message message)
Message to the webhook.message - The message to sendCompletableFuturejava.lang.NullPointerException - If null is providedWebhookClient.isWait(),
WebhookMessageBuilder.fromJavacord(org.javacord.api.entity.message.Message)@NotNull public @NotNull java.util.concurrent.CompletableFuture<ReadonlyMessage> send(@NotNull org.javacord.api.entity.message.embed.Embed embed)
Embed to the webhook.embed - The embed to sendCompletableFuturejava.lang.NullPointerException - If null is providedWebhookClient.isWait(),
WebhookEmbedBuilder.fromJavacord(org.javacord.api.entity.message.embed.Embed)@NotNull public @NotNull java.util.concurrent.CompletableFuture<ReadonlyMessage> edit(long messageId, @NotNull org.javacord.api.entity.message.Message message)
Message to the webhook.messageId - The target message idmessage - The message to sendCompletableFuturejava.lang.NullPointerException - If null is providedWebhookClient.isWait(),
WebhookMessageBuilder.fromJavacord(org.javacord.api.entity.message.Message)@NotNull public @NotNull java.util.concurrent.CompletableFuture<ReadonlyMessage> edit(long messageId, @NotNull org.javacord.api.entity.message.embed.Embed embed)
Embed to the webhook.messageId - The target message idembed - The embed to sendCompletableFuturejava.lang.NullPointerException - If null is providedWebhookClient.isWait(),
WebhookEmbedBuilder.fromJavacord(org.javacord.api.entity.message.embed.Embed)