Interface CustomEmojiBuilderDelegate
-
public interface CustomEmojiBuilderDelegateThis class is internally used by theCustomEmojiBuilderto 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 voidaddRoleToWhitelist(Role role)Adds a role to the whitelist.CompletableFuture<KnownCustomEmoji>create()Creates the custom emoji.voidsetAuditLogReason(String reason)Sets the reason for the creation.voidsetImage(byte[] image)Sets the image of the emoji.voidsetImage(byte[] image, String type)Sets the image of the emoji.voidsetImage(BufferedImage image)Sets the image of the emoji.voidsetImage(BufferedImage image, String type)Sets the image of the emoji.voidsetImage(File image)Sets the image of the emoji.voidsetImage(InputStream image)Sets the image of the emoji.voidsetImage(InputStream image, String type)Sets the image of the emoji.voidsetImage(URL image)Sets the image of the emoji.voidsetImage(Icon image)Sets the image of the emoji.voidsetName(String name)Sets the name of the emoji.voidsetWhitelist(Collection<Role> roles)Sets the roles which should be whitelisted.voidsetWhitelist(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.
-
-