public class GuildEmojiCreateSpec extends Object implements AuditSpec<GuildEmojiCreateRequest>
GuildEmoji
objects. Emojis and animated emojis have a maximum file size of 256kb.Constructor and Description |
---|
GuildEmojiCreateSpec() |
Modifier and Type | Method and Description |
---|---|
GuildEmojiCreateSpec |
addRole(Snowflake roleId)
Adds a role for which the created
GuildEmoji will be whitelisted. |
GuildEmojiCreateRequest |
asRequest() |
String |
getReason()
Returns the current audit log reason set on the spec.
|
GuildEmojiCreateSpec |
setImage(Image image)
Sets the image for the created
GuildEmoji . |
GuildEmojiCreateSpec |
setName(String name)
Sets the name for the created
GuildEmoji . |
GuildEmojiCreateSpec |
setReason(String reason)
Sets the reason to show in the audit logs when the spec is built.
|
public GuildEmojiCreateSpec setName(String name)
GuildEmoji
.name
- The name for the emoji.public GuildEmojiCreateSpec setImage(Image image)
GuildEmoji
.image
- The image used for the emoji.public GuildEmojiCreateSpec addRole(Snowflake roleId)
GuildEmoji
will be whitelisted.roleId
- The role identifier.public GuildEmojiCreateSpec setReason(@Nullable String reason)
AuditSpec
setReason
in interface AuditSpec<GuildEmojiCreateRequest>
reason
- The audit log reason.@Nullable public String getReason()
AuditSpec
getReason
in interface AuditSpec<GuildEmojiCreateRequest>
public GuildEmojiCreateRequest asRequest()
asRequest
in interface Spec<GuildEmojiCreateRequest>