Interface CustomEmojiManager

All Superinterfaces:
AuditableRestAction<Void>, Manager<CustomEmojiManager>, RestAction<Void>

public interface CustomEmojiManager extends Manager<CustomEmojiManager>
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 Details

  • Method Details

    • reset

      @Nonnull CustomEmojiManager 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(CustomEmojiManager.NAME | CustomEmojiManager.ROLES);

      Flag Constants:

      Specified by:
      reset in interface Manager<CustomEmojiManager>
      Parameters:
      fields - Integer value containing the flags to reset.
      Returns:
      CustomEmojiManager for chaining convenience
    • reset

      @Nonnull CustomEmojiManager reset(long... fields)
      Resets the fields specified by the provided bit-flag patterns.
      Example: manager.reset(CustomEmojiManager.NAME, CustomEmojiManager.ROLES);

      Flag Constants:

      Specified by:
      reset in interface Manager<CustomEmojiManager>
      Parameters:
      fields - Integer values containing the flags to reset.
      Returns:
      CustomEmojiManager for chaining convenience
    • getGuild

      @Nonnull default Guild getGuild()
      The Guild this Manager's RichCustomEmoji is in.
      This is logically the same as calling getEmoji().getGuild()
      Returns:
      The parent Guild
    • getEmoji

      The target RichCustomEmoji that will be modified by this Manager
      Returns:
      The target emoji
    • setName

      Sets the name of the selected RichCustomEmoji.

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

      Example: tatDab or fmgSUP

      Parameters:
      name - The new name for the selected RichCustomEmoji
      Returns:
      CustomEmojiManager for chaining convenience
      Throws:
      IllegalArgumentException - If the provided name is null or not between 2-32 characters long
    • setRoles

      Sets the restriction roles of the selected RichCustomEmoji.
      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 of Roles for the selected RichCustomEmoji to be restricted to, or null to clear the roles
      Returns:
      CustomEmojiManager for chaining convenience
      Throws:
      IllegalArgumentException - If any of the provided values is null