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 voidaddEmbed(EmbedBuilder embed)Adds the embed to the message.voidaddEmbeds(EmbedBuilder... embeds)Adds the embeds to the message.voidremoveAllEmbeds()Removes all embeds from the message.voidremoveEmbed(EmbedBuilder embed)Removes the embed from the message.voidremoveEmbeds(EmbedBuilder... embeds)Removes the embeds from the message.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
addAttachment, addAttachment, addAttachment, addAttachment, addAttachment, addAttachment, addAttachmentAsSpoiler, addAttachmentAsSpoiler, addAttachmentAsSpoiler, addFile, addFile, addFile, addFile, addFile, addFile, addFileAsSpoiler, addFileAsSpoiler, addFileAsSpoiler, append, append, append, appendCode, appendNewLine, getStringBuilder, replyTo, send, send, send, send, sendWithWebhook, setAllowedMentions, setContent, setNonce, setTts
-
-
-
-
Method Detail
-
addEmbed
void addEmbed(EmbedBuilder embed)
Adds the embed to the message.- Specified by:
addEmbedin interfaceMessageBuilderDelegate- Parameters:
embed- The embed to add.
-
addEmbeds
void addEmbeds(EmbedBuilder... embeds)
Adds the embeds to the message.- Parameters:
embeds- The embeds to add.
-
removeEmbed
void removeEmbed(EmbedBuilder embed)
Removes the embed from the message.- Parameters:
embed- The embed to remove.
-
removeEmbeds
void removeEmbeds(EmbedBuilder... embeds)
Removes the embeds from the message.- Parameters:
embeds- The embeds to remove.
-
removeAllEmbeds
void removeAllEmbeds()
Removes all embeds from the message.- Specified by:
removeAllEmbedsin interfaceMessageBuilderDelegate
-
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.
-
-