Package net.dv8tion.jda.api.managers
Interface CustomEmojiManager
- All Superinterfaces:
AuditableRestAction<Void>,Manager<CustomEmojiManager>,RestAction<Void>
Manager providing functionality to update one or more fields for an
RichCustomEmoji.
Example
manager.setName("minn")
.setRoles(null)
.queue();
manager.reset(CustomEmojiManager.NAME | CustomEmojiManager.ROLES)
.setName("dv8")
.setRoles(roles)
.queue();
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longUsed to reset the name fieldstatic final longUsed to reset the roles fieldFields inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
MAX_REASON_LENGTH -
Method Summary
Modifier and TypeMethodDescriptiongetEmoji()The targetRichCustomEmojithat will be modified by this Managerdefault GuildgetGuild()TheGuildthis Manager'sRichCustomEmojiis in.reset(long fields) Resets the fields specified by the provided bit-flag pattern.reset(long... fields) Resets the fields specified by the provided bit-flag patterns.Sets the name of the selectedRichCustomEmoji.Sets the restriction roles of the selectedRichCustomEmoji.Methods inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
reasonMethods inherited from interface net.dv8tion.jda.api.managers.Manager
deadline, reset, setCheck, timeoutMethods inherited from interface net.dv8tion.jda.api.requests.RestAction
addCheck, and, and, complete, complete, completeAfter, delay, delay, delay, delay, flatMap, flatMap, getCheck, getJDA, map, mapToResult, onErrorFlatMap, onErrorFlatMap, onErrorMap, onErrorMap, onSuccess, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter, zip
-
Field Details
-
NAME
static final long NAMEUsed to reset the name field- See Also:
-
ROLES
static final long ROLESUsed to reset the roles field- See Also:
-
-
Method Details
-
reset
Resets the fields specified by the provided bit-flag pattern. You can specify a combination by using a bitwise OR concat of the flag constants.
Example:manager.reset(CustomEmojiManager.NAME | CustomEmojiManager.ROLES);Flag Constants:
- Specified by:
resetin interfaceManager<CustomEmojiManager>- Parameters:
fields- Integer value containing the flags to reset.- Returns:
- CustomEmojiManager for chaining convenience
-
reset
Resets the fields specified by the provided bit-flag patterns.
Example:manager.reset(CustomEmojiManager.NAME, CustomEmojiManager.ROLES);Flag Constants:
- Specified by:
resetin interfaceManager<CustomEmojiManager>- Parameters:
fields- Integer values containing the flags to reset.- Returns:
- CustomEmojiManager for chaining convenience
-
getGuild
TheGuildthis Manager'sRichCustomEmojiis in.
This is logically the same as callinggetEmoji().getGuild()- Returns:
- The parent
Guild
-
getEmoji
The targetRichCustomEmojithat will be modified by this Manager- Returns:
- The target emoji
-
setName
Sets the name of the selectedRichCustomEmoji.An emoji name must be between 2-32 characters long!
Emoji names may only be populated with alphanumeric (with underscore and dash).Example:
tatDaborfmgSUP- Parameters:
name- The new name for the selectedRichCustomEmoji- Returns:
- CustomEmojiManager for chaining convenience
- Throws:
IllegalArgumentException- If the provided name isnullor not between 2-32 characters long
-
setRoles
Sets the restriction roles of the selectedRichCustomEmoji.
If these are empty the emoji will be available to everyone otherwise only available to the specified roles.An emoji's restriction roles must not contain
null!- Parameters:
roles- The new set ofRolesfor the selectedRichCustomEmojito be restricted to, ornullto clear the roles- Returns:
- CustomEmojiManager for chaining convenience
- Throws:
IllegalArgumentException- If any of the provided values isnull
-