Interface EmbedAuthor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default java.util.Optional<java.util.concurrent.CompletableFuture<java.awt.image.BufferedImage>>downloadIconAsBufferedImage(DiscordApi api)Deprecated.UseiconAsBufferedImage(DiscordApi)instead.default java.util.Optional<java.util.concurrent.CompletableFuture<byte[]>>downloadIconAsByteArray(DiscordApi api)Deprecated.UseiconAsByteArray(DiscordApi)instead.default java.util.Optional<java.io.InputStream>downloadIconAsInputStream(DiscordApi api)Deprecated.UseiconAsInputStream(DiscordApi)instead.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 aBufferedImage.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.
-
downloadIconAsBufferedImage
@Deprecated default java.util.Optional<java.util.concurrent.CompletableFuture<java.awt.image.BufferedImage>> downloadIconAsBufferedImage(DiscordApi api)
Deprecated.UseiconAsBufferedImage(DiscordApi)instead.Downloads the author icon as aBufferedImage.- Parameters:
api- The discord api instance used to download the author icon.- Returns:
- The thumbnail as a
BufferedImage.
-
downloadIconAsByteArray
@Deprecated default java.util.Optional<java.util.concurrent.CompletableFuture<byte[]>> downloadIconAsByteArray(DiscordApi api)
Deprecated.UseiconAsByteArray(DiscordApi)instead.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.
-
downloadIconAsInputStream
@Deprecated default java.util.Optional<java.io.InputStream> downloadIconAsInputStream(DiscordApi api) throws java.io.IOException
Deprecated.UseiconAsInputStream(DiscordApi)instead.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.
-
iconAsBufferedImage
java.util.Optional<java.util.concurrent.CompletableFuture<java.awt.image.BufferedImage>> iconAsBufferedImage(DiscordApi api)
Downloads the author icon as aBufferedImage.- 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.
-
-