Package org.javacord.api.entity
Interface Icon
-
public interface IconThis class represents a discord icon, for example a server icon or a user avatar.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description CompletableFuture<BufferedImage>asBufferedImage()Gets the icon asBufferedImage.CompletableFuture<byte[]>asByteArray()Gets the icon as byte array.CompletableFuture<InputStream>asInputStream()Gets the input stream for the icon.URLgetUrl()Gets the url of the icon.default booleanisAnimated()Checks if the icon is animated.
-
-
-
Method Detail
-
getUrl
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
CompletableFuture<byte[]> asByteArray()
Gets the icon as byte array.- Returns:
- The icon as byte array.
-
asInputStream
CompletableFuture<InputStream> asInputStream()
Gets the input stream for the icon. This can be used forMessageable.sendMessage(InputStream, String)- Returns:
- The input stream for the icon.
-
asBufferedImage
CompletableFuture<BufferedImage> asBufferedImage()
Gets the icon asBufferedImage.- Returns:
- The icon as BufferedImage.
-
-