mirror of
https://github.com/evennia/evennia.git
synced 2026-04-04 23:17:17 +02:00
Further cleanup in the error logic for commands - the system now gives resonable suggestions for all commands.
This commit is contained in:
parent
181abb84a8
commit
e4006bf386
3 changed files with 10 additions and 6 deletions
|
|
@ -193,7 +193,7 @@ def cmdhandler(caller, raw_string, testing=False):
|
|||
sysarg = raw_string
|
||||
else:
|
||||
sysarg = "Command '%s' is not available." % raw_string
|
||||
suggestions = string_suggestions(raw_string, cmdset.get_all_cmd_keys_and_aliases(), cutoff=0.7, maxnum=3)
|
||||
suggestions = string_suggestions(raw_string, cmdset.get_all_cmd_keys_and_aliases(caller), cutoff=0.7, maxnum=3)
|
||||
if suggestions:
|
||||
sysarg += " Did you maybe mean %s?" % utils.list_to_string(suggestions, 'or', addquote=True)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue