.leaveall leaves all except current. Back to extractor

This commit is contained in:
Master Kwoth
2016-01-30 22:34:38 +01:00
parent db94133f3b
commit dbeb2b55ab
5 changed files with 11 additions and 17 deletions

View File

@ -364,7 +364,7 @@ namespace NadekoBot.Modules {
.Description("Nadeko leaves all servers")
.Do(e => {
if (e.User.Id == NadekoBot.OwnerID)
NadekoBot.client.Servers.ForEach(async s => { if (s.Name == "NadekoLog" || s.Name == "Discord Bots") return; await s.Leave(); });
NadekoBot.client.Servers.ForEach(async s => { if (s.Name == e.Server.Name) return; await s.Leave(); });
});

View File

@ -94,6 +94,8 @@ namespace NadekoBot.Modules {
}
try {
if (player.VoiceChannel.Server != e.Server)
throw new ArgumentException("You need to be in the voice channel on this server.");
var sr = await player.CreateStreamRequest(e, e.GetArg("query"), player.VoiceChannel);
if (sr == null)
throw new NullReferenceException("StreamRequest is null.");