This commit is contained in:
deathbybandaid 2022-05-06 09:43:51 -04:00
parent a0740c9289
commit 356805abaf

View File

@ -49,7 +49,23 @@ def prerun():
# The command is not valid
if comrun.is_catchall and not comrun.is_real_command:
valid_command_results = sb.commands.search_similar_commands(comrun.command["trigger_command"])
print(comrun.command_type)
# Don't be annoying when /me is conversation and not a command
if comrun.command_type == "action_command":
return
# Handling for invalid nickname commands
if comrun.command_type == "nickname_command":
if not len(valid_command_results):
comrun.osd("I'm not sure what you are asking me to do! What do you mean by \"%s\" ?" % comrun.command["trigger_str"])
else:
comrun.osd("%s does not appear to be a valid command. Possible Matches: %s" % (comrun.command["trigger_command"], valid_command_results))
return
# normal prefixed command handling
if comrun.command_type == "command":
# warn that a command is not valid
if not len(valid_command_results):
comrun.osd("%s does not appear to be a valid command." % comrun.command["trigger_command"])
else: