Interface Icon


  • public interface Icon
    This class represents a discord icon, for example a server icon or a user avatar.
    • Method Detail

      • getUrl

        java.net.URL getUrl()
        Gets the url of the icon.
        Returns:
        The url of the icon.
      • isAnimated

        default boolean isAnimated()
        Checks if the icon is animated.
        Returns:
        Whether the icon is animated or not.
      • asByteArray

        java.util.concurrent.CompletableFuture<byte[]> asByteArray()
        Gets the icon as byte array.
        Returns:
        The icon as byte array.
      • asInputStream

        java.io.InputStream asInputStream()
                                   throws java.io.IOException
        Gets the input stream for the icon. This can be used for Messageable.sendMessage(InputStream, String)
        Returns:
        The input stream for the icon.
        Throws:
        java.io.IOException - If an IO error occurs.
      • asBufferedImage

        java.util.concurrent.CompletableFuture<java.awt.image.BufferedImage> asBufferedImage()
        Gets the icon as BufferedImage.
        Returns:
        The icon as BufferedImage.