Class EmoteManager


  • public class EmoteManager
    extends net.dv8tion.jda.core.managers.impl.ManagerBase
    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:
    Emote.getManager()
    • Constructor Detail

      • EmoteManager

        public EmoteManager​(net.dv8tion.jda.core.entities.impl.EmoteImpl emote)
        Creates a new EmoteManager instance
        Parameters:
        emote - The target EmoteImpl to modify
        Throws:
        java.lang.IllegalStateException - If the specified Emote is fake or managed.
    • Method Detail

      • getJDA

        public JDA getJDA()
        The JDA instance of this Manager
        Overrides:
        getJDA in class RestAction<java.lang.Void>
        Returns:
        the corresponding JDA instance
      • getGuild

        public Guild getGuild()
        The Guild this Manager's Emote is in.
        This is logically the same as calling getEmote().getGuild()
        Returns:
        The parent Guild
      • getEmote

        public Emote getEmote()
        The target Emote 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 class net.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 class net.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 selected Emote.

        An emote name must be between 2-32 characters long!
        Emote names may only be populated with alphanumeric (with underscore and dash).

        Example: tatDab or fmgSUP

        Parameters:
        name - The new name for the selected Emote
        Returns:
        EmoteManager for chaining convenience
        Throws:
        java.lang.IllegalArgumentException - If the provided name is null or not between 2-32 characters long
      • setRoles

        @CheckReturnValue
        public EmoteManager setRoles​(java.util.Set<Role> roles)
        Sets the restriction roles of the selected Emote.
        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 of Roles for the selected Emote to be restricted to, or null to clear the roles
        Returns:
        EmoteManager for chaining convenience
        Throws:
        java.lang.IllegalArgumentException - If any of the provided values is null