public async Task PausePlayback(CommandContext ctx) { VoiceNextConnection vnc = await GetVNextConnection(ctx); if (vnc == null) { return; } if (vnc.IsPlaying) { vnc.Pause(); } }
public async Task Leave(CommandContext ctx) { VoiceNextExtension voice = ctx.Client.GetVoiceNext(); if (voice == null) { await ctx.Message.RespondAsync("Voice is not activated").ConfigureAwait(false); return; } VoiceNextConnection vnc = await GetVNextConnection(ctx); if (vnc == null) { return; } if (vnc.IsPlaying) { vnc.Pause(); } vnc.Disconnect(); await ctx.RespondAsync("Disconnected"); }