Interface WebhookMessageBuilderDelegate
-
- All Superinterfaces:
MessageBuilderBaseDelegate
public interface WebhookMessageBuilderDelegate extends MessageBuilderBaseDelegate
This class is internally used by theWebhookMessageBuilderto create messages. You usually don't want to interact with this object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<Message>send(DiscordApi api, java.lang.String webhookId, java.lang.String webhookToken)Sends the message without waiting for a response.java.util.concurrent.CompletableFuture<java.lang.Void>sendSilently(DiscordApi api, java.lang.String webhookId, java.lang.String webhookToken)Sends the message without waiting for a response.java.util.concurrent.CompletableFuture<java.lang.Void>sendSilently(IncomingWebhook webhook)Sends the message without waiting for a response.default voidsetDisplayAuthor(MessageAuthor author)Sets the display avatar of the webhook.default voidsetDisplayAuthor(User author)Sets the display avatar of the webhook.voidsetDisplayAvatar(java.net.URL avatarUrl)Sets the display avatar of the webhook.voidsetDisplayAvatar(Icon avatar)Sets the display avatar of the webhook.voidsetDisplayName(java.lang.String displayName)Sets the display name of the webhook.-
Methods inherited from interface org.javacord.api.entity.message.internal.MessageBuilderBaseDelegate
addActionRow, addAttachment, addAttachment, addAttachment, addAttachment, addAttachment, addAttachment, addAttachmentAsSpoiler, addAttachmentAsSpoiler, addAttachmentAsSpoiler, addComponents, addEmbed, addEmbeds, addFile, addFile, addFile, addFile, addFile, addFile, addFileAsSpoiler, addFileAsSpoiler, addFileAsSpoiler, addSticker, addStickers, append, append, append, appendCode, appendNamedLink, appendNewLine, copy, edit, getStringBuilder, removeAllComponents, removeAllEmbeds, removeComponent, removeComponent, removeEmbed, removeEmbeds, replyTo, send, send, send, send, sendWithWebhook, setAllowedMentions, setContent, setNonce, setTts
-
-
-
-
Method Detail
-
setDisplayName
void setDisplayName(java.lang.String displayName)
Sets the display name of the webhook.- Parameters:
displayName- The display name of the webhook.
-
setDisplayAvatar
void setDisplayAvatar(java.net.URL avatarUrl)
Sets the display avatar of the webhook.- Parameters:
avatarUrl- The display avatar of the webhook.
-
setDisplayAvatar
void setDisplayAvatar(Icon avatar)
Sets the display avatar of the webhook.- Parameters:
avatar- The display avatar of the webhook.
-
setDisplayAuthor
default void setDisplayAuthor(MessageAuthor author)
Sets the display avatar of the webhook.- Parameters:
author- The author to take display name and display avatar of.
-
setDisplayAuthor
default void setDisplayAuthor(User author)
Sets the display avatar of the webhook.- Parameters:
author- The author to take display name and display avatar of.
-
send
java.util.concurrent.CompletableFuture<Message> send(DiscordApi api, java.lang.String webhookId, java.lang.String webhookToken)
Sends the message without waiting for a response.- Parameters:
api- The api instance needed to send and return the message.webhookId- The id of the webhook from which the message should be sent.webhookToken- The token of the webhook from which the message should be sent.- Returns:
- The sent message.
-
sendSilently
java.util.concurrent.CompletableFuture<java.lang.Void> sendSilently(IncomingWebhook webhook)
Sends the message without waiting for a response.- Parameters:
webhook- The webhook from which the message should be sent.- Returns:
- A CompletableFuture indicating whether sending the request to discord was successful.
-
sendSilently
java.util.concurrent.CompletableFuture<java.lang.Void> sendSilently(DiscordApi api, java.lang.String webhookId, java.lang.String webhookToken)
Sends the message without waiting for a response.- Parameters:
api- The api instance needed to send the message.webhookId- The id of the webhook from which the message should be sent.webhookToken- The token of the webhook from which the message should be sent.- Returns:
- A CompletableFuture indicating whether sending the request to discord was successful.
-
-