fix: added severity to bot ban command
This commit is contained in:
@@ -46,6 +46,12 @@ public sealed class PandaBanCommand : IPandaCommand
|
||||
var minutes = (uint) message.Duration!;
|
||||
var isGlobalBan = (bool) message.Global!;
|
||||
|
||||
if (Enum.TryParse(message.Severity!, ignoreCase: true, out NoteSeverity severity))
|
||||
{
|
||||
UtkaSendResponse(context, false);
|
||||
return;
|
||||
}
|
||||
|
||||
var located = await locator.LookupIdByNameOrIdAsync(target);
|
||||
if (located == null)
|
||||
{
|
||||
@@ -101,7 +107,7 @@ public sealed class PandaBanCommand : IPandaCommand
|
||||
roundId,
|
||||
playtime,
|
||||
reason,
|
||||
NoteSeverity.High,
|
||||
severity,
|
||||
player,
|
||||
null,
|
||||
serverName);
|
||||
|
||||
@@ -141,6 +141,9 @@ public sealed class UtkaBanRequest : PandaBaseRequestEventMessage
|
||||
|
||||
[JsonPropertyName("global")]
|
||||
public bool? Global { get; set; }
|
||||
|
||||
[JsonPropertyName("severity")]
|
||||
public string? Severity { get; set; }
|
||||
}
|
||||
|
||||
public sealed class UtkaBanResponse : PandaBaseMessage
|
||||
|
||||
Reference in New Issue
Block a user