Interface EmbedBuilderDelegate



  • public interface EmbedBuilderDelegate
    This class is internally used by the EmbedBuilder to created embeds. You usually don't want to interact with this object.
    • Method Detail

      • setTitle

        void setTitle​(String title)
        Sets the title of the embed.
        Parameters:
        title - The title of the embed.
      • setDescription

        void setDescription​(String description)
        Sets the description of the embed.
        Parameters:
        description - The description of the embed.
      • setUrl

        void setUrl​(String url)
        Sets the url of the embed.
        Parameters:
        url - The url of the embed.
      • setTimestampToNow

        void setTimestampToNow​()
        Sets the current time as timestamp of the embed.
      • setTimestamp

        void setTimestamp​(Instant timestamp)
        Sets the timestamp of the embed.
        Parameters:
        timestamp - The timestamp to set.
      • setColor

        void setColor​(Color color)
        Sets the color of the embed.
        Parameters:
        color - The color of the embed.
      • setFooter

        void setFooter​(String text)
        Sets the footer of the embed.
        Parameters:
        text - The text of the footer.
      • setFooter

        void setFooter​(String text,
                       String iconUrl)
        Sets the footer of the embed.
        Parameters:
        text - The text of the footer.
        iconUrl - The url of the footer's icon.
      • setFooter

        void setFooter​(String text,
                       Icon icon)
        Sets the footer of the embed.
        Parameters:
        text - The text of the footer.
        icon - The footer's icon.
      • setFooter

        void setFooter​(String text,
                       File icon)
        Sets the footer of the embed.
        Parameters:
        text - The text of the footer.
        icon - The footer's icon.
      • setFooter

        void setFooter​(String text,
                       InputStream icon)
        Sets the footer of the embed. This method assumes the file type is "png"!
        Parameters:
        text - The text of the footer.
        icon - The footer's icon.
      • setFooter

        void setFooter​(String text,
                       InputStream icon,
                       String fileType)
        Sets the footer of the embed.
        Parameters:
        text - The text of the footer.
        icon - The footer's icon.
        fileType - The type of the file, e.g. "png" or "gif".
      • setFooter

        void setFooter​(String text,
                       byte[] icon)
        Sets the footer of the embed. This method assumes the file type is "png"!
        Parameters:
        text - The text of the footer.
        icon - The footer's icon.
      • setFooter

        void setFooter​(String text,
                       byte[] icon,
                       String fileType)
        Sets the footer of the embed.
        Parameters:
        text - The text of the footer.
        icon - The footer's icon.
        fileType - The type of the file, e.g. "png" or "gif".
      • setFooter

        void setFooter​(String text,
                       BufferedImage icon)
        Sets the footer of the embed. This method assumes the file type is "png"!
        Parameters:
        text - The text of the footer.
        icon - The footer's icon.
      • setFooter

        void setFooter​(String text,
                       BufferedImage icon,
                       String fileType)
        Sets the footer of the embed.
        Parameters:
        text - The text of the footer.
        icon - The footer's icon.
        fileType - The type of the file, e.g. "png" or "gif".
      • setImage

        void setImage​(String url)
        Sets the image of the embed.
        Parameters:
        url - The url of the image.
      • setImage

        void setImage​(Icon image)
        Sets the image of the embed.
        Parameters:
        image - The image.
      • setImage

        void setImage​(File image)
        Sets the image of the embed.
        Parameters:
        image - The image.
      • setImage

        void setImage​(InputStream image)
        Sets the image of the embed. This method assumes the file type is "png"!
        Parameters:
        image - The image.
      • setImage

        void setImage​(InputStream image,
                      String fileType)
        Sets the image of the embed.
        Parameters:
        image - The image.
        fileType - The type of the file, e.g. "png" or "gif".
      • setImage

        void setImage​(byte[] image)
        Sets the image of the embed. This method assumes the file type is "png"!
        Parameters:
        image - The image.
      • setImage

        void setImage​(byte[] image,
                      String fileType)
        Sets the image of the embed.
        Parameters:
        image - The image.
        fileType - The type of the file, e.g. "png" or "gif".
      • setImage

        void setImage​(BufferedImage image)
        Sets the image of the embed. This method assumes the file type is "png"!
        Parameters:
        image - The image.
      • setImage

        void setImage​(BufferedImage image,
                      String fileType)
        Sets the image of the embed.
        Parameters:
        image - The image.
        fileType - The type of the file, e.g. "png" or "gif".
      • setAuthor

        void setAuthor​(MessageAuthor author)
        Sets the author of the embed.
        Parameters:
        author - The message author which should be used as author.
      • setAuthor

        void setAuthor​(User author)
        Sets the author of the embed.
        Parameters:
        author - The user which should be used as author.
      • setAuthor

        void setAuthor​(String name)
        Sets the author of the embed.
        Parameters:
        name - The name of the author.
      • setAuthor

        void setAuthor​(String name,
                       String url,
                       String iconUrl)
        Sets the author of the embed.
        Parameters:
        name - The name of the author.
        url - The url of the author.
        iconUrl - The url of the author's icon.
      • setAuthor

        void setAuthor​(String name,
                       String url,
                       Icon icon)
        Sets the author of the embed.
        Parameters:
        name - The name of the author.
        url - The url of the author.
        icon - The author's icon.
      • setAuthor

        void setAuthor​(String name,
                       String url,
                       File icon)
        Sets the author of the embed.
        Parameters:
        name - The name of the author.
        url - The url of the author.
        icon - The author's icon.
      • setAuthor

        void setAuthor​(String name,
                       String url,
                       InputStream icon)
        Sets the author of the embed. This method assumes the file type is "png"!
        Parameters:
        name - The name of the author.
        url - The url of the author.
        icon - The author's icon.
      • setAuthor

        void setAuthor​(String name,
                       String url,
                       InputStream icon,
                       String fileType)
        Sets the author of the embed.
        Parameters:
        name - The name of the author.
        url - The url of the author.
        icon - The author's icon.
        fileType - The type of the file, e.g. "png" or "gif".
      • setAuthor

        void setAuthor​(String name,
                       String url,
                       byte[] icon)
        Sets the author of the embed. This method assumes the file type is "png"!
        Parameters:
        name - The name of the author.
        url - The url of the author.
        icon - The author's icon.
      • setAuthor

        void setAuthor​(String name,
                       String url,
                       byte[] icon,
                       String fileType)
        Sets the author of the embed.
        Parameters:
        name - The name of the author.
        url - The url of the author.
        icon - The author's icon.
        fileType - The type of the file, e.g. "png" or "gif".
      • setAuthor

        void setAuthor​(String name,
                       String url,
                       BufferedImage icon)
        Sets the author of the embed. This method assumes the file type is "png"!
        Parameters:
        name - The name of the author.
        url - The url of the author.
        icon - The author's icon.
      • setAuthor

        void setAuthor​(String name,
                       String url,
                       BufferedImage icon,
                       String fileType)
        Sets the author of the embed.
        Parameters:
        name - The name of the author.
        url - The url of the author.
        icon - The author's icon.
        fileType - The type of the file, e.g. "png" or "gif".
      • setThumbnail

        void setThumbnail​(String url)
        Sets the thumbnail of the embed.
        Parameters:
        url - The url of the thumbnail.
      • setThumbnail

        void setThumbnail​(Icon thumbnail)
        Sets the thumbnail of the embed.
        Parameters:
        thumbnail - The thumbnail.
      • setThumbnail

        void setThumbnail​(File thumbnail)
        Sets the thumbnail of the embed.
        Parameters:
        thumbnail - The thumbnail.
      • setThumbnail

        void setThumbnail​(InputStream thumbnail)
        Sets the thumbnail of the embed. This method assumes the file type is "png"!
        Parameters:
        thumbnail - The thumbnail.
      • setThumbnail

        void setThumbnail​(InputStream thumbnail,
                          String fileType)
        Sets the thumbnail of the embed.
        Parameters:
        thumbnail - The thumbnail.
        fileType - The type of the file, e.g. "png" or "gif".
      • setThumbnail

        void setThumbnail​(byte[] thumbnail)
        Sets the thumbnail of the embed. This method assumes the file type is "png"!
        Parameters:
        thumbnail - The thumbnail.
      • setThumbnail

        void setThumbnail​(byte[] thumbnail,
                          String fileType)
        Sets the thumbnail of the embed.
        Parameters:
        thumbnail - The thumbnail.
        fileType - The type of the file, e.g. "png" or "gif".
      • setThumbnail

        void setThumbnail​(BufferedImage thumbnail)
        Sets the thumbnail of the embed. This method assumes the file type is "png"!
        Parameters:
        thumbnail - The thumbnail.
      • setThumbnail

        void setThumbnail​(BufferedImage thumbnail,
                          String fileType)
        Sets the thumbnail of the embed.
        Parameters:
        thumbnail - The thumbnail.
        fileType - The type of the file, e.g. "png" or "gif".
      • addField

        void addField​(String name,
                      String value,
                      boolean inline)
        Adds a field to the embed.
        Parameters:
        name - The name of the field.
        value - The value of the field.
        inline - Whether the field should be inline or not.
      • updateFields

        void updateFields​(Predicate<EmbedField> predicate,
                          Consumer<EditableEmbedField> updater)
        Updates all fields of the embed that satisfy the given predicate using the given updater.
        Parameters:
        predicate - The predicate that fields have to satisfy to get updated.
        updater - The updater for the fields; the EditableEmbedField is only valid during the run of the updater; any try to save it in a variable and reuse it later after this method call will fail with exceptions.
      • removeFields

        void removeFields​(Predicate<EmbedField> predicate)
        Removes all fields of the embed that satisfy the given predicate.
        Parameters:
        predicate - The predicate that fields have to satisfy to get removed.
      • requiresAttachments

        boolean requiresAttachments​()
        Checks if this embed requires any attachments.
        Returns:
        Whether the embed requires attachments or not.