Interface WebhookMessageBuilderDelegate

    • Method Detail

      • 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.
      • 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.