public class D4JWebhookClient extends WebhookClient
WebhookClient.BucketallowedMentions, bucket, client, defaultTimeout, id, isQueued, isShutdown, parseMessage, pool, queue, url, USER_AGENT, WEBHOOK_URL| Constructor and Description |
|---|
D4JWebhookClient(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 reactor.core.publisher.Mono<ReadonlyMessage> |
edit(long messageId,
@NotNull java.util.function.Consumer<? super discord4j.core.spec.MessageCreateSpec> callback)
Edits the target message with the provided
MessageCreateSpec to the webhook. |
static @NotNull WebhookClient |
from(discord4j.core.object.entity.Webhook webhook)
Creates a WebhookClient for the provided webhook.
|
@NotNull reactor.core.publisher.Mono<ReadonlyMessage> |
send(@NotNull java.util.function.Consumer<? super discord4j.core.spec.MessageCreateSpec> callback)
Sends the provided
MessageCreateSpec 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 D4JWebhookClient(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 discord4j.core.object.entity.Webhook webhook)
webhook - The webhookjava.lang.NullPointerException - If the webhook is null or does not provide a token@NotNull @CheckReturnValue public @NotNull reactor.core.publisher.Mono<ReadonlyMessage> send(@NotNull @NotNull java.util.function.Consumer<? super discord4j.core.spec.MessageCreateSpec> callback)
MessageCreateSpec to the webhook.callback - The callback used to specify the desired message settingsMonojava.lang.NullPointerException - If null is providedWebhookClient.isWait(),
WebhookMessageBuilder.fromD4J(Consumer)@NotNull @CheckReturnValue public @NotNull reactor.core.publisher.Mono<ReadonlyMessage> edit(long messageId, @NotNull @NotNull java.util.function.Consumer<? super discord4j.core.spec.MessageCreateSpec> callback)
MessageCreateSpec to the webhook.messageId - The target message idcallback - The callback used to specify the desired message settingsMonojava.lang.NullPointerException - If null is providedWebhookClient.isWait(),
WebhookMessageBuilder.fromD4J(Consumer)