Package net.dv8tion.jda.client.managers
Class EmoteManager
- java.lang.Object
-
- net.dv8tion.jda.core.requests.RestAction<T>
-
- net.dv8tion.jda.core.requests.restaction.AuditableRestAction<java.lang.Void>
-
- net.dv8tion.jda.core.managers.impl.ManagerBase
-
- net.dv8tion.jda.client.managers.EmoteManager
-
public class EmoteManager extends net.dv8tion.jda.core.managers.impl.ManagerBase
Manager providing functionality to update one or more fields for anEmote
.Example
manager.setName("minn") .setRoles(null) .queue(); manager.reset(EmoteManager.NAME | EmoteManager.ROLES) .setName("dv8") .setRoles(roles) .queue();
- See Also:
Emote.getManager()
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.dv8tion.jda.core.requests.restaction.AuditableRestAction
AuditableRestAction.EmptyRestAction<T>
-
-
Field Summary
Fields Modifier and Type Field Description static long
NAME
Used to reset the name fieldstatic long
ROLES
Used to reset the roles field-
Fields inherited from class net.dv8tion.jda.core.requests.RestAction
DEFAULT_FAILURE, DEFAULT_SUCCESS, LOG
-
-
Constructor Summary
Constructors Constructor Description EmoteManager(net.dv8tion.jda.core.entities.impl.EmoteImpl emote)
Creates a new EmoteManager instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Emote
getEmote()
The targetEmote
that will be modified by this ManagerGuild
getGuild()
JDA
getJDA()
TheJDA
instance of this ManagerEmoteManager
reset(long fields)
Resets the fields specified by the provided bit-flag pattern.EmoteManager
reset(long... fields)
Resets the fields specified by the provided bit-flag patterns.EmoteManager
setName(java.lang.String name)
Sets the name of the selectedEmote
.EmoteManager
setRoles(java.util.Set<Role> roles)
Sets the restriction roles of the selectedEmote
.-
Methods inherited from class net.dv8tion.jda.core.managers.impl.ManagerBase
complete, isPermissionChecksEnabled, queue, setPermissionChecksEnabled
-
Methods inherited from class net.dv8tion.jda.core.requests.restaction.AuditableRestAction
reason, setCheck
-
Methods inherited from class net.dv8tion.jda.core.requests.RestAction
complete, completeAfter, isPassContext, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, setPassContext, submit, submit, submitAfter, submitAfter
-
-
-
-
Field Detail
-
NAME
public static final long NAME
Used to reset the name field- See Also:
- Constant Field Values
-
ROLES
public static final long ROLES
Used to reset the roles field- See Also:
- Constant Field Values
-
-
Method Detail
-
getJDA
public JDA getJDA()
TheJDA
instance of this Manager- Overrides:
getJDA
in classRestAction<java.lang.Void>
- Returns:
- the corresponding JDA instance
-
getEmote
public Emote getEmote()
The targetEmote
that will be modified by this Manager- Returns:
- The target Emote
-
reset
@CheckReturnValue public EmoteManager reset(long fields)
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:
- Overrides:
reset
in classnet.dv8tion.jda.core.managers.impl.ManagerBase
- Parameters:
fields
- Integer value containing the flags to reset.- Returns:
- EmoteManager for chaining convenience
-
reset
@CheckReturnValue public EmoteManager reset(long... fields)
Resets the fields specified by the provided bit-flag patterns. You can specify a combination by using a bitwise OR concat of the flag constants.
Example:manager.reset(EmoteManager.NAME, EmoteManager.ROLES);
Flag Constants:
- Overrides:
reset
in classnet.dv8tion.jda.core.managers.impl.ManagerBase
- Parameters:
fields
- Integer values containing the flags to reset.- Returns:
- EmoteManager for chaining convenience
-
setName
@CheckReturnValue public EmoteManager setName(java.lang.String name)
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:
java.lang.IllegalArgumentException
- If the provided name isnull
or not between 2-32 characters long
-
setRoles
@CheckReturnValue public EmoteManager setRoles(java.util.Set<Role> roles)
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
!
-
-