Roleban completions (#9114)

* Roleban completions

* helpers

* eat my peenor dumb robot
This commit is contained in:
Kara
2022-06-24 04:14:47 -07:00
committed by GitHub
parent 7a9bd79263
commit 4d8ff35640
4 changed files with 91 additions and 8 deletions

View File

@@ -10,8 +10,8 @@ namespace Content.Server.Administration.Commands;
public sealed class RoleUnbanCommand : IConsoleCommand
{
public string Command => "roleunban";
public string Description => "Pardons a player's role ban";
public string Help => $"Usage: {Command} <role ban id>";
public string Description => Loc.GetString("cmd-roleunban-desc");
public string Help => Loc.GetString("cmd-roleunban-help");
public async void Execute(IConsoleShell shell, string argStr, string[] args)
{
@@ -57,4 +57,14 @@ public sealed class RoleUnbanCommand : IConsoleCommand
shell.WriteLine($"Pardoned ban with id {banId}");
}
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
{
// Can't think of good way to do hint options for this
return args.Length switch
{
1 => CompletionResult.FromHint(Loc.GetString("cmd-roleunban-hint-1")),
_ => CompletionResult.Empty
};
}
}