Exemple #1
0
        public async Task PausePlayback(CommandContext ctx)
        {
            VoiceNextConnection vnc = await GetVNextConnection(ctx);

            if (vnc == null)
            {
                return;
            }
            if (vnc.IsPlaying)
            {
                vnc.Pause();
            }
        }
Exemple #2
0
        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");
        }