Interface SoundboardSoundManager

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

public interface SoundboardSoundManager extends Manager<SoundboardSoundManager>
Manager providing functionality to update one or more fields for a SoundboardSound.

Example

manager.setVolume(0.33)
       .setEmoji(null)
       .queue();
manager.reset(SoundboardSoundManager.VOLUME | SoundboardSoundManager.EMOJI)
       .setVolume(1)
       .setEmoji(Emoji.fromUnicode("🤔"))
       .queue();
See Also:
  • Field Details

  • Method Details

    • reset

      @Nonnull @CheckReturnValue SoundboardSoundManager 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(SoundboardSoundManager.VOLUME | SoundboardSoundManager.EMOJI);

      Flag Constants:

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

      @Nonnull @CheckReturnValue SoundboardSoundManager reset(@Nonnull long... fields)
      Resets the fields specified by the provided bit-flag patterns.
      Example: manager.reset(SoundboardSoundManager.VOLUME | SoundboardSoundManager.EMOJI);

      Flag Constants:

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

      @Nonnull Guild getGuild()
      The Guild this Manager's SoundboardSound is in.
      Returns:
      The parent Guild
    • setName

      @Nonnull @CheckReturnValue SoundboardSoundManager setName(@Nonnull String name)
      Sets the name of the selected SoundboardSound.

      A role name must not be null nor less than 2 characters or more than 32 characters long!

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

      @Nonnull @CheckReturnValue SoundboardSoundManager setVolume(double volume)
      Sets the volume of the selected SoundboardSound.
      Parameters:
      volume - The new volume for the selected SoundboardSound
      Returns:
      SoundboardSoundManager for chaining convenience
      Throws:
      IllegalArgumentException - If the provided volume is not between 0-1
    • setEmoji

      @Nonnull @CheckReturnValue SoundboardSoundManager setEmoji(@Nullable Emoji emoji)
      Sets the emoji of the selected SoundboardSound.
      Parameters:
      emoji - The new emoji for the selected SoundboardSound, can be null
      Returns:
      SoundboardSoundManager for chaining convenience