mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -05:00
test AI
This commit is contained in:
parent
8aa5c14b25
commit
6b54366e39
@ -106,11 +106,31 @@ def bot_command_rule_ai(bot, trigger):
|
|||||||
if trigger_command not in commands_list:
|
if trigger_command not in commands_list:
|
||||||
if not SpiceBot.letters_in_string(trigger_command):
|
if not SpiceBot.letters_in_string(trigger_command):
|
||||||
return
|
return
|
||||||
# invalid_display = ["I don't seem to have a command for " + str(trigger_command) + "!"]
|
# hyphen args handling
|
||||||
# TODO
|
valid_args = ["check"]
|
||||||
# invalid_display.append("If you have a suggestion for this command, you can run .feature ." + str(trigger_command))
|
hyphen_args = []
|
||||||
# invalid_display.append("ADD DESCRIPTION HERE!")
|
argssplit = spicemanip(fulltrigger, "2+", 'list')
|
||||||
# bot.osd(invalid_display, trigger.nick, 'notice')
|
for worditem in argssplit:
|
||||||
|
if str(worditem).startswith("--"):
|
||||||
|
clipped_word = str(worditem[2:]).lower()
|
||||||
|
# valid arg above
|
||||||
|
if clipped_word in valid_args:
|
||||||
|
hyphen_args.append(clipped_word)
|
||||||
|
# only one arg allowed
|
||||||
|
invalid_display = []
|
||||||
|
if len(hyphen_args):
|
||||||
|
hyphenarg = hyphen_args[0]
|
||||||
|
if hyphenarg in ['check']:
|
||||||
|
invalid_display = ["I don't seem to have a command for " + str(trigger_command) + "!"]
|
||||||
|
else:
|
||||||
|
invalid_display = []
|
||||||
|
# invalid_display = ["I don't seem to have a command for " + str(trigger_command) + "!"]
|
||||||
|
# TODO
|
||||||
|
# invalid_display.append("If you have a suggestion for this command, you can run .feature ." + str(trigger_command))
|
||||||
|
# invalid_display.append("ADD DESCRIPTION HERE!")
|
||||||
|
# bot.osd(invalid_display, trigger.nick, 'notice')
|
||||||
|
if len(invalid_display):
|
||||||
|
bot.osd(invalid_display, trigger.nick, 'notice')
|
||||||
return
|
return
|
||||||
|
|
||||||
elif command_type == 'nickname':
|
elif command_type == 'nickname':
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user