playSound

open suspend fun playSound(sound: SoundboardSoundBehavior)(source)

Plays sound in this channel.

This requires the Permission.Speak and Permission.UseSoundboard permissions, and also the Permission.UseExternalSounds permission if the sound is from a different server. Additionally, requires the user to be connected to the voice channel, having a voice state without VoiceState.isDeafened, VoiceState.isSelfDeafened, VoiceState.isMuted, or VoiceState.isSuppressed enabled.

See also

SoundboardSoundBehavior.play

Throws

if something went wrong during the request.