feat(commands): show command suggestions if a command was not found

This commit is contained in:
dusk 2025-01-11 22:38:29 +09:00
parent ee45fca6ab
commit f0d287b873
No known key found for this signature in database
7 changed files with 58 additions and 23 deletions

View file

@ -26,10 +26,10 @@ public class Parameters
// just used for errors, temporarily
public string FullCommand { get; init; }
public Parameters(string cmd)
public Parameters(string prefix, string cmd)
{
FullCommand = cmd;
var result = CommandsMethods.ParseCommand(cmd);
var result = CommandsMethods.ParseCommand(prefix, cmd);
if (result is CommandResult.Ok)
{
var command = ((CommandResult.Ok)result).@command;