From 869c1e54237cb447a9659324ebf95bf0b8b5c7c8 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Wed, 27 Apr 2016 23:54:30 +0200 Subject: [PATCH] `!m getlink`/`!m gl` shows a link to the currently playing song --- NadekoBot/Modules/Music/MusicModule.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/NadekoBot/Modules/Music/MusicModule.cs b/NadekoBot/Modules/Music/MusicModule.cs index bb0acd11..b7724429 100644 --- a/NadekoBot/Modules/Music/MusicModule.cs +++ b/NadekoBot/Modules/Music/MusicModule.cs @@ -589,6 +589,20 @@ namespace NadekoBot.Modules.Music 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}>"); + }); }); }