test
This commit is contained in:
parent
6b0f4da42b
commit
05d1799c3c
@ -22,12 +22,12 @@ def get_commands(bot, trigger):
|
|||||||
elif first_trigger.startswith(bot.nick):
|
elif first_trigger.startswith(bot.nick):
|
||||||
first_trigger_type = "nickname_command"
|
first_trigger_type = "nickname_command"
|
||||||
first_trigger_prefix = str(first_trigger.split(" ")[0])
|
first_trigger_prefix = str(first_trigger.split(" ")[0])
|
||||||
first_trigger = str(first_trigger.split(" ")[1:])
|
first_trigger = " ".join(first_trigger.split(" ")[1:])
|
||||||
elif "intent" in trigger.tags:
|
elif "intent" in trigger.tags:
|
||||||
if trigger.tags["intent"] == "ACTION":
|
if trigger.tags["intent"] == "ACTION":
|
||||||
first_trigger_type = "action_command"
|
first_trigger_type = "action_command"
|
||||||
first_trigger_prefix = "ACTION"
|
first_trigger_prefix = "ACTION"
|
||||||
first_trigger = str(first_trigger.split(" ")[1:])
|
first_trigger = " ".join(first_trigger.split(" ")[1:])
|
||||||
else:
|
else:
|
||||||
bot.say("what kind of rule command is this")
|
bot.say("what kind of rule command is this")
|
||||||
first_trigger_type = "rule"
|
first_trigger_type = "rule"
|
||||||
@ -49,11 +49,11 @@ def get_commands(bot, trigger):
|
|||||||
elif trigger_item.startswith(bot.nick):
|
elif trigger_item.startswith(bot.nick):
|
||||||
trigger_type = "nickname_command"
|
trigger_type = "nickname_command"
|
||||||
trigger_prefix = str(trigger_item.split(" ")[0])
|
trigger_prefix = str(trigger_item.split(" ")[0])
|
||||||
trigger_str = str(trigger_item.split(" ")[1:])
|
trigger_str = " ".join(trigger_item.split(" ")[1:])
|
||||||
elif trigger_item.startswith(tuple(["ACTION", "/me"])):
|
elif trigger_item.startswith(tuple(["ACTION", "/me"])):
|
||||||
trigger_type = "action_command"
|
trigger_type = "action_command"
|
||||||
trigger_prefix = "ACTION"
|
trigger_prefix = "ACTION"
|
||||||
trigger_str = str(trigger_item.split(" ")[1:])
|
trigger_str = " ".join(trigger_item.split(" ")[1:])
|
||||||
else:
|
else:
|
||||||
# Assume same command type until proven otherwise
|
# Assume same command type until proven otherwise
|
||||||
trigger_type = first_trigger_type
|
trigger_type = first_trigger_type
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user