Table of Contents

Method SendSoundboardSoundAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

SendSoundboardSoundAsync(ulong, ulong?)

Sends a soundboard sound to a voice channel the user is connected to.

public Task SendSoundboardSoundAsync(ulong soundId, ulong? sourceGuildId = null)

Parameters

soundId ulong

The ID of the soundboard sound to play.

sourceGuildId ulong?

The ID of the guild the soundboard sound is from, required to play sounds from different servers. Optional.

Returns

Task

Exceptions

UnauthorizedException

Thrown when the client does not have the Speak, UseSoundboard , or UseExternalSounds permissions, or if the user's voice state is invalid.

ServerErrorException

Thrown when Discord is unable to process the request.