mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
- Using PeriodicTimer in a few places instead of Timer
- Some small refactorings - Fixed reference to non-existent command in bot.yml
This commit is contained in:
@@ -243,8 +243,8 @@ public partial class Administration
|
||||
|
||||
var allShardStrings = statuses.Select(st =>
|
||||
{
|
||||
var stateStr = ConnectionStateToEmoji(st);
|
||||
var timeDiff = DateTime.UtcNow - st.LastUpdate;
|
||||
var stateStr = ConnectionStateToEmoji(st);
|
||||
var maxGuildCountLength =
|
||||
statuses.Max(x => x.GuildCount).ToString().Length;
|
||||
return $"`{stateStr} "
|
||||
@@ -272,9 +272,9 @@ public partial class Administration
|
||||
var timeDiff = DateTime.UtcNow - status.LastUpdate;
|
||||
return status.ConnectionState switch
|
||||
{
|
||||
ConnectionState.Connected => "✅",
|
||||
ConnectionState.Disconnected => "🔻",
|
||||
_ when timeDiff > TimeSpan.FromSeconds(30) => " ❗ ",
|
||||
ConnectionState.Connected => "✅",
|
||||
_ => " ⏳"
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user