예제 #1
0
        private async Task <IAudioClient> JoinChannel(SocketVoiceChannel channel)
        {
            if (AudioClients.IsInChannelOf(channel.Guild.Id))
            {
                await AudioClients.LeaveChannelOn(channel.Guild.Id);
            }

            return(await AudioClients.Join(channel));
        }
예제 #2
0
        public async Task Leave()
        {
            if (!AudioClients.IsInChannelOf(Context.Guild.Id))
            {
                await ReplyAsync("I'm not even in a channel!");

                return;
            }

            await AudioClients.LeaveChannelOn(Context.Guild.Id);
        }