Package net.dv8tion.jda.api.managers
Interface EmoteManager
-
- All Superinterfaces:
AuditableRestAction<java.lang.Void>
,Manager<EmoteManager>
,RestAction<java.lang.Void>
public interface EmoteManager extends Manager<EmoteManager>
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()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Emote
getEmote()
The targetEmote
that will be modified by this Managerdefault Guild
getGuild()
EmoteManager
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 pattern.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 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 Detail
-
NAME
static final long NAME
Used to reset the name field- See Also:
- Constant Field Values
-
ROLES
static final long ROLES
Used to reset the roles field- See Also:
- Constant Field Values
-
-
Method Detail
-
reset
@Nonnull 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:
- Specified by:
reset
in interfaceManager<EmoteManager>
- Parameters:
fields
- Integer value containing the flags to reset.- Returns:
- EmoteManager for chaining convenience
-
reset
@Nonnull 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:
- Specified by:
reset
in interfaceManager<EmoteManager>
- Parameters:
fields
- Integer values containing the flags to reset.- Returns:
- EmoteManager for chaining convenience
-
getEmote
@Nonnull Emote getEmote()
The targetEmote
that will be modified by this Manager- Returns:
- The target Emote
-
setName
@Nonnull @CheckReturnValue EmoteManager setName(@Nonnull 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
@Nonnull @CheckReturnValue EmoteManager setRoles(@Nullable 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
!
-
-