fix: if punishment is 0 ie permanent show permanent

This commit is contained in:
Dollan
2024-03-31 01:23:15 +01:00
parent 8df1e70d5a
commit a377871951

View File

@@ -234,8 +234,10 @@ namespace CS2_SimpleAdmin
string targetName = target != null ? target.PlayerName : "Unknown";
string targetSteamId = target != null ? new SteamID(target.SteamID).SteamId2.ToString() : "Unknown";
string time = duration != 0 ? ConvertMinutesToTime(duration) : "Permanent";
string[] fieldNames = ["Player:", "SteamID:", "Duration:", "Reason:", "Admin:"];
string[] fieldValues = [$"[{targetName}]({targetcommunityUrl})", targetSteamId, ConvertMinutesToTime(duration), reason, $"[{callerName}]({callercommunityUrl})"];
string[] fieldValues = [$"[{targetName}]({targetcommunityUrl})", targetSteamId, time, reason, $"[{callerName}]({callercommunityUrl})"];
bool[] inlineFlags = [true, true, true, false, false];
var embed = new EmbedBuilder