Package net.dv8tion.jda.api.managers
Interface EmoteManager
- All Superinterfaces:
AuditableRestAction<Void>
,Manager<EmoteManager>
,RestAction<Void>
Manager providing functionality to update one or more fields for an
Emote
.
Example
manager.setName("minn")
.setRoles(null)
.queue();
manager.reset(EmoteManager.NAME | EmoteManager.ROLES)
.setName("dv8")
.setRoles(roles)
.queue();
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetEmote()
The targetEmote
that will be modified by this Managerdefault Guild
getGuild()
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 pattern.Sets the name of the selectedEmote
.Sets the restriction roles of the selectedEmote
.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, 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(EmoteManager.NAME | EmoteManager.ROLES);
Flag Constants:
- Specified by:
reset
in interfaceManager<EmoteManager>
- Parameters:
fields
- Integer value containing the flags to reset.- Returns:
- EmoteManager for chaining convenience
-
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(EmoteManager.NAME, EmoteManager.ROLES);
Flag Constants:
- Specified by:
reset
in interfaceManager<EmoteManager>
- Parameters:
fields
- Integer values containing the flags to reset.- Returns:
- EmoteManager for chaining convenience
-
getGuild
- Returns:
- The parent
Guild
-
getEmote
The targetEmote
that will be modified by this Manager- Returns:
- The target Emote
-
setName
Sets the name of the selectedEmote
.An emote name must be between 2-32 characters long!
Emote names may only be populated with alphanumeric (with underscore and dash).Example:
tatDab
orfmgSUP
- Parameters:
name
- The new name for the selectedEmote
- Returns:
- EmoteManager for chaining convenience
- Throws:
IllegalArgumentException
- If the provided name isnull
or not between 2-32 characters long
-
setRoles
Sets the restriction roles of the selectedEmote
.
If these are empty the Emote will be available to everyone otherwise only available to the specified roles.An emote's restriction roles must not contain
null
!- Parameters:
roles
- The new set ofRoles
for the selectedEmote
to be restricted to, ornull
to clear the roles- Returns:
- EmoteManager for chaining convenience
- Throws:
IllegalArgumentException
- If any of the provided values isnull
-