Shards will now show when they're unresponsive in .shardstats command
This commit is contained in:
		@@ -270,7 +270,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
                    add += Format.Bold(GetText("queue_stopped", Format.Code(Prefix + "play"))) + "\n";
 | 
			
		||||
                var mps = mp.MaxPlaytimeSeconds;
 | 
			
		||||
                if (mps > 0)
 | 
			
		||||
                    add += Format.Bold(GetText("song_skips_after", TimeSpan.FromSeconds(mps).ToString("g"))) + "\n";
 | 
			
		||||
                    add += Format.Bold(GetText("song_skips_after", TimeSpan.FromSeconds(mps).ToString("HH\\:mm\\:ss"))) + "\n";
 | 
			
		||||
                if (mp.RepeatCurrentSong)
 | 
			
		||||
                    add += "🔂 " + GetText("repeating_cur_song") + "\n";
 | 
			
		||||
                else if (mp.Shuffle)
 | 
			
		||||
 
 | 
			
		||||
@@ -295,8 +295,13 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
 | 
			
		||||
            var allShardStrings = statuses
 | 
			
		||||
                .Select(x =>
 | 
			
		||||
                    GetText("shard_stats_txt", x.ShardId.ToString(),
 | 
			
		||||
                        Format.Bold(x.ConnectionState.ToString()), Format.Bold(x.Guilds.ToString())))
 | 
			
		||||
                {
 | 
			
		||||
                    var timeDiff = DateTime.UtcNow - x.Time;
 | 
			
		||||
                    if (timeDiff > TimeSpan.FromSeconds(20))
 | 
			
		||||
                        return $"Shard #{x.ShardId.ToString()} **UNRESPONSIVE** for {timeDiff.ToString(@"hh\:mm\:ss")}";
 | 
			
		||||
                    return GetText("shard_stats_txt", x.ShardId.ToString(),
 | 
			
		||||
                        Format.Bold(x.ConnectionState.ToString()), Format.Bold(x.Guilds.ToString()), timeDiff.ToString(@"hh\:mm\:ss"));
 | 
			
		||||
                        })
 | 
			
		||||
                .ToArray();
 | 
			
		||||
 | 
			
		||||
            await Context.Channel.SendPaginatedConfirmAsync(_client, page, (curPage) =>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user