readded %playing% and %queued% placeholders
This commit is contained in:
		| @@ -89,25 +89,26 @@ namespace NadekoBot.DataStructures.Replacements | |||||||
|             return this; |             return this; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         //public ReplacementBuilder WithMusic(MusicService ms) |         public ReplacementBuilder WithMusic(MusicService ms) | ||||||
|         //{ |         { | ||||||
|         //    _reps.TryAdd("%playing%", () => |             _reps.TryAdd("%playing%", () => | ||||||
|         //    { |             { | ||||||
|         //        var cnt = ms.MusicPlayers.Count(kvp => kvp.Value.CurrentSong != null); |                 var cnt = ms.MusicPlayers.Count(kvp => kvp.Value.Current.Current != null); | ||||||
|         //        if (cnt != 1) return cnt.ToString(); |                 if (cnt != 1) return cnt.ToString(); | ||||||
|         //        try |                 try | ||||||
|         //        { |                 { | ||||||
|         //            var mp = ms.MusicPlayers.FirstOrDefault(); |                     var mp = ms.MusicPlayers.FirstOrDefault(); | ||||||
|         //            return mp.Value.CurrentSong.SongInfo.Title; |                     var title =  mp.Value?.Current.Current?.Title; | ||||||
|         //        } |                     return title ?? "No songs"; | ||||||
|         //        catch |                 } | ||||||
|         //        { |                 catch | ||||||
|         //            return "No songs"; |                 { | ||||||
|         //        } |                     return "error"; | ||||||
|         //    }); |                 } | ||||||
|         //    _reps.TryAdd("%queued%", () => ms.MusicPlayers.Sum(kvp => kvp.Value.Playlist.Count).ToString()); |             }); | ||||||
|         //    return this; |             _reps.TryAdd("%queued%", () => ms.MusicPlayers.Sum(kvp => kvp.Value.QueueArray().Songs.Length).ToString()); | ||||||
|         //} |             return this; | ||||||
|  |         } | ||||||
|  |  | ||||||
|         public ReplacementBuilder WithRngRegex() |         public ReplacementBuilder WithRngRegex() | ||||||
|         { |         { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user