Roleban completions (#9114)
* Roleban completions * helpers * eat my peenor dumb robot
This commit is contained in:
@@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user