small change

This commit is contained in:
Kwoth 2016-01-19 06:43:52 +01:00
parent f0277b1ba8
commit 828ffdaf75

View File

@ -77,13 +77,14 @@ namespace NadekoBot.Modules {
cgb.CreateCommand("s") cgb.CreateCommand("s")
.Alias("stop") .Alias("stop")
.Description("Completely stops the music and unbinds the bot from the channel.") .Description("Completely stops the music and unbinds the bot from the channel and cleanes up files.")
.Do(e => { .Do(e => {
SongQueue.Clear(); SongQueue.Clear();
if (CurrentSong != null) { if (CurrentSong != null) {
CurrentSong.Cancel(); CurrentSong.Cancel();
CurrentSong = null; CurrentSong = null;
} }
Directory.Delete("StreamBuffers", true);
}); });
cgb.CreateCommand("p") cgb.CreateCommand("p")
.Alias("pause") .Alias("pause")
@ -206,9 +207,9 @@ namespace NadekoBot.Modules {
StartBuffering(); StartBuffering();
linkResolved = true; linkResolved = true;
Channel.Send(":musical_note: **Queued** " + video.FullName); Channel.Send(":musical_note: **Queued** " + video.FullName);
} catch (Exception) { } catch (Exception e) {
// Send a message to the guy that queued that // Send a message to the guy that queued that
Channel.SendMessage(":warning: " + User.Mention + " Cannot load youtube url: `This video is not available in your country` or the url is corrupted somehow..."); Channel.SendMessage(":warning: The url is corrupted somehow...");
Console.WriteLine("Cannot parse youtube url: " + query); Console.WriteLine("Cannot parse youtube url: " + query);
Cancel(); Cancel();
} }