Interface ISoundboardSoundChannel
- All Superinterfaces:
AudioChannel, Channel, Comparable<GuildChannel>, Formattable, GuildChannel, ICategorizableChannel, ICopyableChannel, IDetachableEntity, IInviteContainer, IMemberContainer, IMentionable, IPermissionContainer, IPositionableChannel, ISnowflake, StandardGuildChannel
- All Known Subinterfaces:
VoiceChannel
Channel in which you can send soundboard sounds.
-
Field Summary
Fields inherited from interface Channel
MAX_NAME_LENGTHFields inherited from interface GuildChannel
JUMP_URL -
Method Summary
Modifier and TypeMethodDescriptiondefault RestAction<Void> sendSoundboardSound(SoundboardSoundSnowflake sound, long sourceGuildId) Sends this sound to this audio channel.sendSoundboardSound(SoundboardSoundSnowflake sound, String sourceGuildId) Sends this sound to this audio channel.Methods inherited from interface AudioChannel
getBitrate, getManager, getRegion, getRegionRaw, getUserLimitMethods inherited from interface Comparable
compareToMethods inherited from interface GuildChannel
delete, getGuild, getJumpUrl, getPermissionContainerMethods inherited from interface ICategorizableChannel
getParentCategory, getParentCategoryId, getParentCategoryIdLong, getPositionInCategory, isSyncedMethods inherited from interface IDetachableEntity
isDetachedMethods inherited from interface IInviteContainer
createInvite, retrieveInvitesMethods inherited from interface IMemberContainer
getMembersMethods inherited from interface IPermissionContainer
getMemberPermissionOverrides, getPermissionOverride, getPermissionOverrides, getRolePermissionOverrides, upsertPermissionOverrideMethods inherited from interface IPositionableChannel
getPosition, getPositionRawMethods inherited from interface ISnowflake
getId, getIdLong, getTimeCreatedMethods inherited from interface StandardGuildChannel
createCopy, createCopy
-
Method Details
-
sendSoundboardSound
@Nonnull @CheckReturnValue RestAction<Void> sendSoundboardSound(@Nonnull SoundboardSoundSnowflake sound, @Nullable String sourceGuildId) Sends this sound to this audio channel.
The bot must be connected to the voice channel to use this method, as well as be unmuted and undefeaned.The returned
RestActioncan encounter the followingErrorResponses:MISSING_PERMISSIONS
The sound cannot be sent due to a permission discrepancyCANNOT_SEND_VOICE_EFFECT
The sound cannot be sent as the bot is either muted, deafened or suppressedUNKNOWN_SOUND
The sound was deleted/does not exist
- Parameters:
sound- The sound to sendsourceGuildId- The guild ID from which this sound is from,nullfor default sounds- Returns:
RestAction- Type:Void- Throws:
InsufficientPermissionException- If the bot does not have the following permissions:VOICE_SPEAK,VOICE_USE_SOUNDBOARD- If the sound comes from other guilds,
VOICE_USE_EXTERNAL_SOUNDSpermission
IllegalArgumentException- If the provided sound isnull, or the source guild ID is not null and not a snowflakeIllegalStateException-- If the bot is not connected to this channel
- If the bot is deafened, muted or suppressed in this channel's guild
DetachedEntityException- If this entity isdetached
-
sendSoundboardSound
@Nonnull @CheckReturnValue default RestAction<Void> sendSoundboardSound(@Nonnull SoundboardSoundSnowflake sound, long sourceGuildId) Sends this sound to this audio channel.
The bot must be connected to the voice channel to use this method, as well as be unmuted and undefeaned.The returned
RestActioncan encounter the followingErrorResponses:MISSING_PERMISSIONS
The sound cannot be sent due to a permission discrepancyCANNOT_SEND_VOICE_EFFECT
The sound cannot be sent as the bot is either muted, deafened or suppressedUNKNOWN_SOUND
The sound was deleted/does not exist
- Parameters:
sound- The sound to sendsourceGuildId- The guild ID from which this sound is from,0for default sounds- Returns:
RestAction- Type:Void- Throws:
InsufficientPermissionException- If the bot does not have the following permissions:VOICE_SPEAK,VOICE_USE_SOUNDBOARD- If the sound comes from other guilds,
VOICE_USE_EXTERNAL_SOUNDSpermission
IllegalArgumentException- If the provided sound isnullIllegalStateException-- If the bot is not connected to this channel
- If the bot is deafened, muted or suppressed in this channel's guild
DetachedEntityException- If this entity isdetached
-