Class DiscordAssets
ImageProxy of most Discord assets.-
Method Summary
Modifier and TypeMethodDescriptionstatic ImageProxyapplicationCover(ImageFormat format, String applicationId, String coverId) Returns anImageProxyof an application's cover.static ImageProxyapplicationIcon(ImageFormat format, String applicationId, String iconId) Returns anImageProxyof an application's icon.static ImageProxyapplicationTeamIcon(ImageFormat format, String teamId, String iconId) Returns anImageProxyof an application team's icon.static ImageProxychannelIcon(ImageFormat format, String channelId, String iconId) Returns anImageProxyof a channel's icon.static ImageProxycustomEmoji(ImageFormat format, String id) Returns anImageProxyof a custom emoji's icon.static ImageProxyguildBanner(ImageFormat format, String guildId, String bannerId) Returns anImageProxyof a guild's banner.static ImageProxyguildIcon(ImageFormat format, String guildId, String iconId) Returns anImageProxyof a guild's icon.static ImageProxyguildSplash(ImageFormat format, String guildId, String splashId) Returns anImageProxyof a guild's splash image.static ImageProxymemberAvatar(ImageFormat format, String guildId, String userId, String avatarId) Returns anImageProxyof a member's avatar.static ImageProxyroleIcon(ImageFormat format, String roleId, String iconId) Returns anImageProxyof a role's icon.static ImageProxyscheduledEventCoverImage(ImageFormat format, String eventId, String imageId) Returns anImageProxyof a scheduled event's cover image.static ImageProxystickerPackBanner(ImageFormat format, String bannerId) Returns anImageProxyof a sticker pack's banner.static ImageProxyuserAvatar(ImageFormat format, String userId, String avatarId) Returns anImageProxyof a user's avatar.static ImageProxyuserBanner(ImageFormat format, String userId, String bannerId) Returns anImageProxyof a user's banner.static ImageProxyuserDefaultAvatar(ImageFormat format, String avatarId) Returns anImageProxyof a user's default avatar.static ImageProxyuserTagBadge(ImageFormat format, String guildId, String badgeId) Returns anImageProxyof a user's tag badge.
-
Method Details
-
applicationIcon
@Contract("_, _, null -> null; _, _, !null -> !null") public static ImageProxy applicationIcon(@Nonnull ImageFormat format, @Nonnull String applicationId, @Nullable String iconId) Returns anImageProxyof an application's icon.
This returnsnullif the icon ID isnull.At the time of writing, the supported formats are:
- Parameters:
format- The image format to request the image asapplicationId- The application IDiconId- The application's icon ID- Returns:
- An
ImageProxyof the application's icon, ornull - Throws:
IllegalArgumentException- If an argument isnull, except for the icon ID
-
applicationCover
@Contract("_, _, null -> null; _, _, !null -> !null") public static ImageProxy applicationCover(@Nonnull ImageFormat format, @Nonnull String applicationId, @Nullable String coverId) Returns anImageProxyof an application's cover.
This returnsnullif the cover ID isnull.At the time of writing, the supported formats are:
- Parameters:
format- The image format to request the image asapplicationId- The application IDcoverId- The application's cover ID- Returns:
- An
ImageProxyof the application's cover, ornull - Throws:
IllegalArgumentException- If an argument isnull, except for the cover ID
-
applicationTeamIcon
@Contract("_, _, null -> null; _, _, !null -> !null") public static ImageProxy applicationTeamIcon(@Nonnull ImageFormat format, @Nonnull String teamId, @Nullable String iconId) Returns anImageProxyof an application team's icon.
This returnsnullif the icon ID isnull.At the time of writing, the supported formats are:
- Parameters:
format- The image format to request the image asteamId- The team IDiconId- The team's icon ID- Returns:
- An
ImageProxyof the application team's icon, ornull - Throws:
IllegalArgumentException- If an argument isnull, except for the icon ID
-
channelIcon
@Contract("_, _, null -> null; _, _, !null -> !null") public static ImageProxy channelIcon(@Nonnull ImageFormat format, @Nonnull String channelId, @Nullable String iconId) Returns anImageProxyof a channel's icon.
This returnsnullif the icon ID isnull.At the time of writing, the supported formats are:
- Parameters:
format- The image format to request the image aschannelId- The channel IDiconId- The team's icon ID- Returns:
- An
ImageProxyof the channel's icon, ornull - Throws:
IllegalArgumentException- If an argument isnull, except for the icon ID
-
customEmoji
Returns anImageProxyof a custom emoji's icon.
This returnsnullif the ID isnull.At the time of writing, the supported formats are:
- Parameters:
format- The image format to request the image asid- The custom emoji's ID- Returns:
- An
ImageProxyof the custom emoji's icon, ornull - Throws:
IllegalArgumentException- If an argument isnull, except for the ID
-
guildIcon
@Contract("_, _, null -> null; _, _, !null -> !null") public static ImageProxy guildIcon(@Nonnull ImageFormat format, @Nonnull String guildId, @Nullable String iconId) Returns anImageProxyof a guild's icon.
This returnsnullif the icon ID isnull.At the time of writing, the supported formats are:
- Parameters:
format- The image format to request the image asguildId- The guild IDiconId- The guild's icon ID- Returns:
- An
ImageProxyof the guild's icon, ornull - Throws:
IllegalArgumentException- If an argument isnull, except for the icon ID
-
guildSplash
@Contract("_, _, null -> null; _, _, !null -> !null") public static ImageProxy guildSplash(@Nonnull ImageFormat format, @Nonnull String guildId, @Nullable String splashId) Returns anImageProxyof a guild's splash image.
This returnsnullif the splash ID isnull.At the time of writing, the supported formats are:
- Parameters:
format- The image format to request the image asguildId- The guild IDsplashId- The guild's splash ID- Returns:
- An
ImageProxyof the guild's splash image, ornull - Throws:
IllegalArgumentException- If an argument isnull, except for the splash ID
-
guildBanner
@Contract("_, _, null -> null; _, _, !null -> !null") public static ImageProxy guildBanner(@Nonnull ImageFormat format, @Nonnull String guildId, @Nullable String bannerId) Returns anImageProxyof a guild's banner.
This returnsnullif the banner ID isnull.At the time of writing, the supported formats are:
- Parameters:
format- The image format to request the image asguildId- The guild IDbannerId- The guild's banner ID- Returns:
- An
ImageProxyof the guild's banner, ornull - Throws:
IllegalArgumentException- If an argument isnull, except for the banner ID
-
memberAvatar
@Contract("_, _, _, null -> null; _, _, _, !null -> !null") public static ImageProxy memberAvatar(@Nonnull ImageFormat format, @Nonnull String guildId, @Nonnull String userId, @Nullable String avatarId) Returns anImageProxyof a member's avatar.
This returnsnullif the avatar ID isnull.At the time of writing, the supported formats are:
- Parameters:
format- The image format to request the image asguildId- The guild IDuserId- The user IDavatarId- The member's avatar ID- Returns:
- An
ImageProxyof the member's avatar, ornull - Throws:
IllegalArgumentException- If an argument isnull, except for the avatar ID
-
roleIcon
@Contract("_, _, null -> null; _, _, !null -> !null") public static ImageProxy roleIcon(@Nonnull ImageFormat format, @Nonnull String roleId, @Nullable String iconId) Returns anImageProxyof a role's icon.
This returnsnullif the icon ID isnull.At the time of writing, the supported formats are:
- Parameters:
format- The image format to request the image asroleId- The role IDiconId- The icon ID- Returns:
- An
ImageProxyof the roles's icon, ornull - Throws:
IllegalArgumentException- If an argument isnull, except for the icon ID
-
scheduledEventCoverImage
@Contract("_, _, null -> null; _, _, !null -> !null") public static ImageProxy scheduledEventCoverImage(@Nonnull ImageFormat format, @Nonnull String eventId, @Nullable String imageId) Returns anImageProxyof a scheduled event's cover image.
This returnsnullif the avatar ID isnull.At the time of writing, the supported formats are:
- Parameters:
format- The image format to request the image aseventId- The event IDimageId- The event's image ID- Returns:
- An
ImageProxyof the scheduled event's cover image, ornull - Throws:
IllegalArgumentException- If an argument isnull, except for the image ID
-
stickerPackBanner
@Contract("_, null -> null; _, !null -> !null") public static ImageProxy stickerPackBanner(@Nonnull ImageFormat format, @Nullable String bannerId) Returns anImageProxyof a sticker pack's banner.
This returnsnullif the banner ID isnull.At the time of writing, the supported formats are:
- Parameters:
format- The image format to request the image asbannerId- The sticker pack's banner ID- Returns:
- An
ImageProxyof the sticker pack's banner, ornull - Throws:
IllegalArgumentException- If an argument isnull, except for the banner ID
-
userAvatar
@Contract("_, _, null -> null; _, _, !null -> !null") public static ImageProxy userAvatar(@Nonnull ImageFormat format, @Nonnull String userId, @Nullable String avatarId) Returns anImageProxyof a user's avatar.
This returnsnullif the avatar ID isnull.At the time of writing, the supported formats are:
- Parameters:
format- The image format to request the image asuserId- The user IDavatarId- The user's avatar ID- Returns:
- An
ImageProxyof the user's avatar, ornull - Throws:
IllegalArgumentException- If an argument isnull, except for the avatar ID
-
userBanner
@Contract("_, _, null -> null; _, _, !null -> !null") public static ImageProxy userBanner(@Nonnull ImageFormat format, @Nonnull String userId, @Nullable String bannerId) Returns anImageProxyof a user's banner.
This returnsnullif the banner ID isnull.At the time of writing, the supported formats are:
- Parameters:
format- The image format to request the image asuserId- The user IDbannerId- The user's banner ID- Returns:
- An
ImageProxyof the user's banner, ornull - Throws:
IllegalArgumentException- If an argument isnull, except for the banner ID
-
userDefaultAvatar
@Nonnull public static ImageProxy userDefaultAvatar(@Nonnull ImageFormat format, @Nonnull String avatarId) Returns anImageProxyof a user's default avatar.At the time of writing, the only supported format is
PNG.Size parameters are ignored by this endpoint.
- Parameters:
avatarId- The user's default avatar ID- Returns:
- An
ImageProxyof the user's default avatar - Throws:
IllegalArgumentException- If an argument isnull
-
userTagBadge
@Contract("_, _, null -> null; _, _, !null -> !null") public static ImageProxy userTagBadge(@Nonnull ImageFormat format, @Nonnull String guildId, @Nullable String badgeId) Returns anImageProxyof a user's tag badge.
This returnsnullif the badge ID isnull.At the time of writing, the supported formats are:
- Parameters:
format- The image format to request the image asguildId- The guild IDbadgeId- The badge ID- Returns:
- An
ImageProxyof the user's tag badge, ornull - Throws:
IllegalArgumentException- If an argument isnull, except for the badge ID
-