Interface CustomEmojiBuilderDelegate
-
public interface CustomEmojiBuilderDelegate
This class is internally used by theCustomEmojiBuilder
to create custom emojis. You usually don't want to interact with this object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addRoleToWhitelist(Role role)
Adds a role to the whitelist.CompletableFuture<KnownCustomEmoji>
create()
Creates the custom emoji.void
setAuditLogReason(String reason)
Sets the reason for the creation.void
setImage(byte[] image)
Sets the image of the emoji.void
setImage(byte[] image, String type)
Sets the image of the emoji.void
setImage(BufferedImage image)
Sets the image of the emoji.void
setImage(BufferedImage image, String type)
Sets the image of the emoji.void
setImage(File image)
Sets the image of the emoji.void
setImage(InputStream image)
Sets the image of the emoji.void
setImage(InputStream image, String type)
Sets the image of the emoji.void
setImage(URL image)
Sets the image of the emoji.void
setImage(Icon image)
Sets the image of the emoji.void
setName(String name)
Sets the name of the emoji.void
setWhitelist(Collection<Role> roles)
Sets the roles which should be whitelisted.void
setWhitelist(Role... roles)
Sets the roles which should be whitelisted.
-
-
-
Method Detail
-
setAuditLogReason
void setAuditLogReason(String reason)
Sets the reason for the creation. This reason will be visible in the audit log entry(s).- Parameters:
reason
- The reason for this update.
-
setName
void setName(String name)
Sets the name of the emoji.- Parameters:
name
- The name of the emoji.
-
setImage
void setImage(Icon image)
Sets the image of the emoji.- Parameters:
image
- The image of the emoji.
-
setImage
void setImage(URL image)
Sets the image of the emoji.- Parameters:
image
- The image of the emoji.
-
setImage
void setImage(File image)
Sets the image of the emoji.- Parameters:
image
- The image file of the emoji.
-
setImage
void setImage(BufferedImage image)
Sets the image of the emoji. This method assumes that the provided image is a png.- Parameters:
image
- The image of the emoji.
-
setImage
void setImage(BufferedImage image, String type)
Sets the image of the emoji.- Parameters:
image
- The image of the emoji.type
- The type of the image, e.g. "png", "jpg" or "gif".
-
setImage
void setImage(byte[] image)
Sets the image of the emoji. This method assumes that the provided image is a png.- Parameters:
image
- The image of the emoji.
-
setImage
void setImage(byte[] image, String type)
Sets the image of the emoji.- Parameters:
image
- The image of the emoji.type
- The type of the image, e.g. "png", "jpg" or "gif".
-
setImage
void setImage(InputStream image)
Sets the image of the emoji. This method assumes that the provided image is a png.- Parameters:
image
- The image of the emoji.
-
setImage
void setImage(InputStream image, String type)
Sets the image of the emoji.- Parameters:
image
- The image of the emoji.type
- The type of the image, e.g. "png", "jpg" or "gif".
-
addRoleToWhitelist
void addRoleToWhitelist(Role role)
Adds a role to the whitelist. To be active, the whitelist must at least contain one role, otherwise everyone can use the emoji!- Parameters:
role
- The role to add.
-
setWhitelist
void setWhitelist(Collection<Role> roles)
Sets the roles which should be whitelisted. To be active, the whitelist must at least contain one role, otherwise everyone can use the emoji!- Parameters:
roles
- The roles which should be whitelisted.
-
setWhitelist
void setWhitelist(Role... roles)
Sets the roles which should be whitelisted. To be active, the whitelist must at least contain one role, otherwise everyone can use the emoji!- Parameters:
roles
- The roles which should be whitelisted.
-
create
CompletableFuture<KnownCustomEmoji> create()
Creates the custom emoji.- Returns:
- The created custom emoji.
-
-