!m getlink/!m gl shows a link to the currently playing song

This commit is contained in:
Master Kwoth 2016-04-27 23:54:30 +02:00
parent 3d3ecec7c8
commit 869c1e5423

View File

@ -589,6 +589,20 @@ namespace NadekoBot.Modules.Music
await e.Channel.SendMessage($"`Skipped to {minutes}:{seconds}`").ConfigureAwait(false); await e.Channel.SendMessage($"`Skipped to {minutes}:{seconds}`").ConfigureAwait(false);
}); });
cgb.CreateCommand("getlink")
.Alias("gl")
.Description("Shows a link to the currently playing song.")
.Do(async e =>
{
MusicPlayer musicPlayer;
if (!MusicPlayers.TryGetValue(e.Server, out musicPlayer))
return;
var curSong = musicPlayer.CurrentSong;
if (curSong == null)
return;
await e.Channel.SendMessage($"🎶`Current song:` <{curSong.SongInfo.Query}>");
});
}); });
} }