Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
GravityWolfNotAmused committed Oct 19, 2024
2 parents 4d3ff23 + 3a36cf8 commit 5a5f26f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DiscordPlayerCountBot/UpdateController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ public async Task UpdatePlayerCounts()
if (ex is OperationCanceledException canceledException)
{
Warn($"Discord host connection was closed. Resetting connection.", bot.Information.Id.ToString());
return;
continue;
}

if (ex is WebSocketException socketException)
{
Warn($"Web socket was found to be in a invalid state.", bot.Information.Id.ToString());
return;
continue;
}

Error($"Please send crash log to https://discord.gg/FPXdPjcX27.", bot.Information.Id.ToString(), ex);
Expand Down
4 changes: 2 additions & 2 deletions DiscordPlayerCountBot/ViewModels/BaseViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public string ReplaceTagsWithValues(string? format, bool useNameAsLabel, string
}

var type = GetType();
var properties = type.GetProperties().ToList();
var properties = type.GetProperties();

foreach (var property in properties)
{
Expand All @@ -41,7 +41,7 @@ public string ReplaceTagsWithValues(string? format, bool useNameAsLabel, string
continue;
}

status = status.Replace(tag, value?.ToString());
status = status.Replace(tag, value?.ToString() ?? "");
}
}

Expand Down

0 comments on commit 5a5f26f

Please sign in to comment.