Interface SoundboardSoundManager
- All Superinterfaces:
AuditableRestAction<Void>, Manager<SoundboardSoundManager>, RestAction<Void>
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final longUsed to reset the emoji fieldstatic final longUsed to reset the name fieldstatic final longUsed to reset the volume fieldFields inherited from interface AuditableRestAction
MAX_REASON_LENGTH -
Method Summary
Modifier and TypeMethodDescriptiongetGuild()TheGuildthis Manager'sSoundboardSoundis in.reset(long fields) Resets the fields specified by the provided bit-flag pattern.reset(long... fields) Resets the fields specified by the provided bit-flag patterns.Sets the emoji of the selectedSoundboardSound.Sets the name of the selectedSoundboardSound.setVolume(double volume) Sets the volume of the selectedSoundboardSound.Methods inherited from interface AuditableRestAction
reasonMethods inherited from interface RestAction
addCheck, and, and, complete, complete, completeAfter, delay, delay, delay, delay, flatMap, flatMap, getCheck, getJDA, map, mapToResult, onErrorFlatMap, onErrorFlatMap, onErrorMap, onErrorMap, onSuccess, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter, zip
-
Field Details
-
NAME
static final long NAMEUsed to reset the name field- See Also:
-
VOLUME
static final long VOLUMEUsed to reset the volume field- See Also:
-
EMOJI
static final long EMOJIUsed to reset the emoji field- See Also:
-
-
Method Details
-
reset
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:
resetin interfaceManager<SoundboardSoundManager>- Parameters:
fields- Integer value containing the flags to reset.- Returns:
- SoundboardSoundManager for chaining convenience
-
reset
Resets the fields specified by the provided bit-flag patterns.
Example:manager.reset(SoundboardSoundManager.VOLUME | SoundboardSoundManager.EMOJI);Flag Constants:
- Specified by:
resetin interfaceManager<SoundboardSoundManager>- Parameters:
fields- Integer values containing the flags to reset.- Returns:
- SoundboardSoundManager for chaining convenience
-
getGuild
-
setName
Sets the name of the selectedSoundboardSound.A role name must not be
nullnor less than 2 characters or more than 32 characters long!- Parameters:
name- The new name for the selectedSoundboardSound- Returns:
- SoundboardSoundManager for chaining convenience
- Throws:
IllegalArgumentException- If the provided name isnullor not between 2-32 characters long
-
setVolume
Sets the volume of the selectedSoundboardSound.- Parameters:
volume- The new volume for the selectedSoundboardSound- Returns:
- SoundboardSoundManager for chaining convenience
- Throws:
IllegalArgumentException- If the provided volume is not between 0-1
-
setEmoji
Sets the emoji of the selectedSoundboardSound.- Parameters:
emoji- The new emoji for the selectedSoundboardSound, can benull- Returns:
- SoundboardSoundManager for chaining convenience
-