Package discord4j.core.spec
Class GuildEmojiCreateSpec
- java.lang.Object
-
- discord4j.core.spec.GuildEmojiCreateSpec
-
- All Implemented Interfaces:
AuditSpec<discord4j.discordjson.json.GuildEmojiCreateRequest>
,Spec<discord4j.discordjson.json.GuildEmojiCreateRequest>
public class GuildEmojiCreateSpec extends Object implements AuditSpec<discord4j.discordjson.json.GuildEmojiCreateRequest>
Spec used to createGuildEmoji
objects. Emojis and animated emojis have a maximum file size of 256kb.- See Also:
- Create Guild Emoji
-
-
Constructor Summary
Constructors Constructor Description GuildEmojiCreateSpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GuildEmojiCreateSpec
addRole(Snowflake roleId)
Adds a role for which the createdGuildEmoji
will be whitelisted.discord4j.discordjson.json.GuildEmojiCreateRequest
asRequest()
String
getReason()
Returns the current audit log reason set on the spec.GuildEmojiCreateSpec
setImage(Image image)
Sets the image for the createdGuildEmoji
.GuildEmojiCreateSpec
setName(String name)
Sets the name for the createdGuildEmoji
.GuildEmojiCreateSpec
setReason(String reason)
Sets the reason to show in the audit logs when the spec is built.
-
-
-
Method Detail
-
setName
public GuildEmojiCreateSpec setName(String name)
Sets the name for the createdGuildEmoji
.- Parameters:
name
- The name for the emoji.- Returns:
- This spec.
-
setImage
public GuildEmojiCreateSpec setImage(Image image)
Sets the image for the createdGuildEmoji
.- Parameters:
image
- The image used for the emoji.- Returns:
- This spec.
-
addRole
public GuildEmojiCreateSpec addRole(Snowflake roleId)
Adds a role for which the createdGuildEmoji
will be whitelisted.- Parameters:
roleId
- The role identifier.- Returns:
- This spec.
-
setReason
public GuildEmojiCreateSpec setReason(@Nullable String reason)
Description copied from interface:AuditSpec
Sets the reason to show in the audit logs when the spec is built.
-
getReason
@Nullable public String getReason()
Description copied from interface:AuditSpec
Returns the current audit log reason set on the spec.
-
-