Interface WebhookMessageBuilderDelegate
-
- All Superinterfaces:
MessageBuilderDelegate
public interface WebhookMessageBuilderDelegate extends MessageBuilderDelegate
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 CompletableFuture<Message>send(DiscordApi api, String webhookId, String webhookToken)Sends the message without waiting for a response.CompletableFuture<Void>sendSilently(DiscordApi api, String webhookId, String webhookToken)Sends the message without waiting for a response.CompletableFuture<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(URL avatarUrl)Sets the display avatar of the webhook.voidsetDisplayAvatar(Icon avatar)Sets the display avatar of the webhook.voidsetDisplayName(String displayName)Sets the display name of the webhook.-
Methods inherited from interface org.javacord.api.entity.message.internal.MessageBuilderDelegate
addActionRow, addAttachment, addAttachment, addAttachment, addAttachment, addAttachment, addAttachment, addAttachmentAsSpoiler, addAttachmentAsSpoiler, addAttachmentAsSpoiler, addComponents, addEmbed, addEmbeds, addFile, addFile, addFile, addFile, addFile, addFile, addFileAsSpoiler, addFileAsSpoiler, addFileAsSpoiler, append, append, append, appendCode, appendNewLine, copy, getStringBuilder, removeAllComponents, removeAllEmbeds, removeComponent, removeComponent, removeEmbed, removeEmbeds, replyTo, send, send, send, send, sendWithWebhook, setAllowedMentions, setContent, setNonce, setTts
-
-
-
-
Method Detail
-
setDisplayName
void setDisplayName(String displayName)
Sets the display name of the webhook.- Parameters:
displayName- The display name of the webhook.
-
setDisplayAvatar
void setDisplayAvatar(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
CompletableFuture<Message> send(DiscordApi api, String webhookId, 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
CompletableFuture<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 or not sending the request to discord was successful.
-
sendSilently
CompletableFuture<Void> sendSilently(DiscordApi api, String webhookId, 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 or not sending the request to discord was successful.
-
-