minor change before submoduling discord.net
This commit is contained in:
parent
80e69addaa
commit
1626ae9a07
@ -167,20 +167,10 @@ namespace NadekoBot.Classes.Music {
|
|||||||
Console.WriteLine($"Buffering done." + $" [{songBuffer.ContentLength}]");
|
Console.WriteLine($"Buffering done." + $" [{songBuffer.ContentLength}]");
|
||||||
if (p != null) {
|
if (p != null) {
|
||||||
try {
|
try {
|
||||||
p.CancelOutputRead();
|
p.Kill();
|
||||||
} catch { }
|
}
|
||||||
try {
|
catch {}
|
||||||
p.StandardOutput.Dispose();
|
|
||||||
} catch { }
|
|
||||||
try {
|
|
||||||
p.CloseMainWindow();
|
|
||||||
} catch { }
|
|
||||||
try {
|
|
||||||
p.Close();
|
|
||||||
} catch { }
|
|
||||||
try {
|
|
||||||
p.Dispose();
|
p.Dispose();
|
||||||
} catch { }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -102,12 +102,12 @@ namespace NadekoBot.Modules {
|
|||||||
await e.Channel.SendMessage("🎵 No active music musicPlayer.");
|
await e.Channel.SendMessage("🎵 No active music musicPlayer.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string toSend = "🎵 **" + musicPlayer.Playlist.Count + "** `tracks currently queued.` ";
|
var toSend = "🎵 **" + musicPlayer.Playlist.Count + "** `tracks currently queued.` ";
|
||||||
if (musicPlayer.Playlist.Count >= MusicPlayer.MaximumPlaylistSize)
|
if (musicPlayer.Playlist.Count >= MusicPlayer.MaximumPlaylistSize)
|
||||||
toSend += "**Song queue is full!**\n";
|
toSend += "**Song queue is full!**\n";
|
||||||
else
|
else
|
||||||
toSend += "\n";
|
toSend += "\n";
|
||||||
int number = 1;
|
var number = 1;
|
||||||
await e.Channel.SendMessage(toSend + string.Join("\n", musicPlayer.Playlist.Take(15).Select(v => $"`{number++}.` {v.PrettyName}")));
|
await e.Channel.SendMessage(toSend + string.Join("\n", musicPlayer.Playlist.Take(15).Select(v => $"`{number++}.` {v.PrettyName}")));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user