This commit is contained in:
deathbybandaid 2022-02-12 15:06:12 -05:00
parent f743e04965
commit b37e025220
2 changed files with 5 additions and 4 deletions

View File

@ -55,7 +55,7 @@ def get_commands(bot, trigger):
trigger_prefix = "ACTION" trigger_prefix = "ACTION"
trigger_str = " ".join(trigger_item.split(" ")[1:]) trigger_str = " ".join(trigger_item.split(" ")[1:])
else: else:
# Assume same command type until proven otherwise # TODO Assume same command type until proven otherwise
trigger_type = first_trigger_type trigger_type = first_trigger_type
trigger_prefix = first_trigger_prefix trigger_prefix = first_trigger_prefix
trigger_str = trigger_item trigger_str = trigger_item
@ -75,11 +75,11 @@ def prerun():
@functools.wraps(function) @functools.wraps(function)
def internal_prerun(bot, trigger, *args, **kwargs): def internal_prerun(bot, trigger, *args, **kwargs):
bot.say(trigger.raw)
# Get list of command(s) # Get list of trigger command(s)
commands = get_commands(bot, trigger) commands = get_commands(bot, trigger)
# If more than 1 command, dispatch
# If more than 1 trigger command, dispatch
if len(commands) > 1: if len(commands) > 1:
for trigger_dict in commands: for trigger_dict in commands:
sb.commands.dispatch(bot, trigger, trigger_dict) sb.commands.dispatch(bot, trigger, trigger_dict)

View File

@ -28,6 +28,7 @@ def sopel_nickname_commands(bot, trigger):
bot.say("testing nickname_commands") bot.say("testing nickname_commands")
for x in sb.commands.sopel_nickname_commands: for x in sb.commands.sopel_nickname_commands:
bot.say(str(x))
for y in x: for y in x:
bot.say(str(y)) bot.say(str(y))