fix: add hostname as embed description

This commit is contained in:
Dollan
2024-04-01 18:30:03 +02:00
parent 8f80e13100
commit ba2bf90340

View File

@@ -240,6 +240,8 @@ namespace CS2_SimpleAdmin
string[] fieldValues = [$"[{targetName}]({targetcommunityUrl})", targetSteamId, time, reason, $"[{callerName}]({callercommunityUrl})"];
bool[] inlineFlags = [true, true, true, false, false];
string? hostname = ConVar.Find("hostname")!.StringValue ?? CS2_SimpleAdmin._localizer?["sa_unknown"] ?? "Unknown";
var embed = new EmbedBuilder
{
Title = penalty switch
@@ -260,6 +262,8 @@ namespace CS2_SimpleAdmin
_ => Color.Default,
},
Description = $"{hostname}",
Timestamp = DateTimeOffset.UtcNow
};