Package discord4j.core.spec.legacy
Class LegacyGuildEmojiCreateSpec
java.lang.Object
discord4j.core.spec.legacy.LegacyGuildEmojiCreateSpec
- All Implemented Interfaces:
LegacyAuditSpec<discord4j.discordjson.json.GuildEmojiCreateRequest>
,LegacySpec<discord4j.discordjson.json.GuildEmojiCreateRequest>
public class LegacyGuildEmojiCreateSpec
extends Object
implements LegacyAuditSpec<discord4j.discordjson.json.GuildEmojiCreateRequest>
LegacySpec used to create
GuildEmoji
objects. Emojis and animated emojis have a maximum file size of 256kb.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a role for which the createdGuildEmoji
will be whitelisted.discord4j.discordjson.json.GuildEmojiCreateRequest
Returns the current audit log reason set on the spec.Sets the image for the createdGuildEmoji
.Sets the name for the createdGuildEmoji
.Sets the reason to show in the audit logs when the spec is built.
-
Constructor Details
-
LegacyGuildEmojiCreateSpec
public LegacyGuildEmojiCreateSpec()
-
-
Method Details
-
setName
Sets the name for the createdGuildEmoji
.- Parameters:
name
- The name for the emoji.- Returns:
- This spec.
-
setImage
Sets the image for the createdGuildEmoji
.- Parameters:
image
- The image used for the emoji.- Returns:
- This spec.
-
addRole
Adds a role for which the createdGuildEmoji
will be whitelisted.- Parameters:
roleId
- The role identifier.- Returns:
- This spec.
-
setReason
Description copied from interface:LegacyAuditSpec
Sets the reason to show in the audit logs when the spec is built.- Specified by:
setReason
in interfaceLegacyAuditSpec<discord4j.discordjson.json.GuildEmojiCreateRequest>
- Parameters:
reason
- The audit log reason.- Returns:
- This spec.
-
getReason
Description copied from interface:LegacyAuditSpec
Returns the current audit log reason set on the spec.- Specified by:
getReason
in interfaceLegacyAuditSpec<discord4j.discordjson.json.GuildEmojiCreateRequest>
- Returns:
- The current audit log reason.
-
asRequest
public discord4j.discordjson.json.GuildEmojiCreateRequest asRequest()- Specified by:
asRequest
in interfaceLegacySpec<discord4j.discordjson.json.GuildEmojiCreateRequest>
-