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
Modifier and TypeFieldDescriptionstatic final long
Used to reset the name fieldstatic final long
Used to reset the roles fieldFields inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
MAX_REASON_LENGTH
-
Method Summary
Modifier and TypeMethodDescriptiongetEmoji()
The targetRichCustomEmoji
that will be modified by this Managerdefault Guild
getGuild()
TheGuild
this Manager'sRichCustomEmoji
is 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
reason
Methods inherited from interface net.dv8tion.jda.api.managers.Manager
deadline, reset, setCheck, timeout
Methods 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:
reset
in 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:
reset
in interfaceManager<CustomEmojiManager>
- Parameters:
fields
- Integer values containing the flags to reset.- Returns:
- CustomEmojiManager for chaining convenience
-
getGuild
TheGuild
this Manager'sRichCustomEmoji
is in.
This is logically the same as callinggetEmoji().getGuild()
- Returns:
- The parent
Guild
-
getEmoji
The targetRichCustomEmoji
that 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:
tatDab
orfmgSUP
- Parameters:
name
- The new name for the selectedRichCustomEmoji
- Returns:
- CustomEmojiManager for chaining convenience
- Throws:
IllegalArgumentException
- If the provided name isnull
or 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 ofRoles
for the selectedRichCustomEmoji
to be restricted to, ornull
to clear the roles- Returns:
- CustomEmojiManager for chaining convenience
- Throws:
IllegalArgumentException
- If any of the provided values isnull
-