Interface EmbedAuthor

  • All Superinterfaces:
    java.util.Formattable, Nameable

    public interface EmbedAuthor
    extends Nameable
    This interface represents an embed author.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Optional<java.net.URL> getIconUrl()
      Gets the url of the author icon.
      java.util.Optional<java.net.URL> getProxyIconUrl()
      Gets the proxy url of the author icon.
      java.util.Optional<java.net.URL> getUrl()
      Gets the url of the author.
      java.util.Optional<java.util.concurrent.CompletableFuture<java.awt.image.BufferedImage>> iconAsBufferedImage​(DiscordApi api)
      Downloads the author icon as a BufferedImage.
      java.util.Optional<java.util.concurrent.CompletableFuture<byte[]>> iconAsByteArray​(DiscordApi api)
      Downloads the author icon as a byte array.
      java.util.Optional<java.io.InputStream> iconAsInputStream​(DiscordApi api)
      Downloads the author icon as an input stream.
    • Method Detail

      • getUrl

        java.util.Optional<java.net.URL> getUrl()
        Gets the url of the author.
        Returns:
        The url of the author.
      • getIconUrl

        java.util.Optional<java.net.URL> getIconUrl()
        Gets the url of the author icon.
        Returns:
        The url of the author icon.
      • getProxyIconUrl

        java.util.Optional<java.net.URL> getProxyIconUrl()
        Gets the proxy url of the author icon.
        Returns:
        The proxy url of the author icon.
      • iconAsBufferedImage

        java.util.Optional<java.util.concurrent.CompletableFuture<java.awt.image.BufferedImage>> iconAsBufferedImage​(DiscordApi api)
        Downloads the author icon as a BufferedImage.
        Parameters:
        api - The discord api instance used to download the author icon.
        Returns:
        The thumbnail as a BufferedImage.
      • iconAsByteArray

        java.util.Optional<java.util.concurrent.CompletableFuture<byte[]>> iconAsByteArray​(DiscordApi api)
        Downloads the author icon as a byte array.
        Parameters:
        api - The discord api instance used to download the author icon.
        Returns:
        The thumbnail as a byte array.
      • iconAsInputStream

        java.util.Optional<java.io.InputStream> iconAsInputStream​(DiscordApi api)
                                                           throws java.io.IOException
        Downloads the author icon as an input stream.
        Parameters:
        api - The discord api instance used to download the author icon.
        Returns:
        The thumbnail as an input stream.
        Throws:
        java.io.IOException - If an IO error occurs.