Package discord4j.core.spec.legacy
Class LegacyGuildEmojiEditSpec
- java.lang.Object
-
- discord4j.core.spec.legacy.LegacyGuildEmojiEditSpec
-
- All Implemented Interfaces:
LegacyAuditSpec<discord4j.discordjson.json.GuildEmojiModifyRequest>,LegacySpec<discord4j.discordjson.json.GuildEmojiModifyRequest>
public class LegacyGuildEmojiEditSpec extends Object implements LegacyAuditSpec<discord4j.discordjson.json.GuildEmojiModifyRequest>
LegacySpec used to modify an existingGuildEmoji.- See Also:
- Modify Guild Emoji
-
-
Constructor Summary
Constructors Constructor Description LegacyGuildEmojiEditSpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description discord4j.discordjson.json.GuildEmojiModifyRequestasRequest()StringgetReason()Returns the current audit log reason set on the spec.LegacyGuildEmojiEditSpecsetName(String name)Sets the name for the modifiedGuildEmoji.LegacyGuildEmojiEditSpecsetReason(String reason)Sets the reason to show in the audit logs when the spec is built.LegacyGuildEmojiEditSpecsetRoles(Set<Snowflake> roles)Sets the list of roles for which the modifiedGuildEmojiwill be whitelisted.
-
-
-
Method Detail
-
setName
public LegacyGuildEmojiEditSpec setName(String name)
Sets the name for the modifiedGuildEmoji.- Parameters:
name- The name for the emoji.- Returns:
- This spec.
-
setRoles
public LegacyGuildEmojiEditSpec setRoles(Set<Snowflake> roles)
Sets the list of roles for which the modifiedGuildEmojiwill be whitelisted.- Parameters:
roles- The set of role identifiers.- Returns:
- This spec.
-
setReason
public LegacyGuildEmojiEditSpec setReason(@Nullable String reason)
Description copied from interface:LegacyAuditSpecSets the reason to show in the audit logs when the spec is built.- Specified by:
setReasonin interfaceLegacyAuditSpec<discord4j.discordjson.json.GuildEmojiModifyRequest>- Parameters:
reason- The audit log reason.- Returns:
- This spec.
-
getReason
@Nullable public String getReason()
Description copied from interface:LegacyAuditSpecReturns the current audit log reason set on the spec.- Specified by:
getReasonin interfaceLegacyAuditSpec<discord4j.discordjson.json.GuildEmojiModifyRequest>- Returns:
- The current audit log reason.
-
asRequest
public discord4j.discordjson.json.GuildEmojiModifyRequest asRequest()
- Specified by:
asRequestin interfaceLegacySpec<discord4j.discordjson.json.GuildEmojiModifyRequest>
-
-