From fbfe20b1dadd3a4272281bde8c10e34b86d5a355 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 5 May 2022 15:13:22 -0400 Subject: [PATCH] test --- sopel_SpiceBot_Core_Prerun/__init__.py | 2 +- spicebot_command_echo/__init__.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sopel_SpiceBot_Core_Prerun/__init__.py b/sopel_SpiceBot_Core_Prerun/__init__.py index 9225ea8..d592ac9 100644 --- a/sopel_SpiceBot_Core_Prerun/__init__.py +++ b/sopel_SpiceBot_Core_Prerun/__init__.py @@ -60,7 +60,7 @@ def prerun(): # If not piping the replies into pipe, let'sprint to IRC now if not comrun.is_pipe_command: for say_message in comrun._say: - bot.say(say_message) + sb.osd(say_message) # Pipe text back to bot for next piped command else: for say_message in comrun._say: diff --git a/spicebot_command_echo/__init__.py b/spicebot_command_echo/__init__.py index b3141d0..08becd2 100644 --- a/spicebot_command_echo/__init__.py +++ b/spicebot_command_echo/__init__.py @@ -8,6 +8,11 @@ from sopel_SpiceBot_Core_Prerun import prerun @prerun() @plugin.command('echo') def echo(bot, trigger, comrun): - comrun.say(comrun.command["trigger_str"]) - comrun.say(comrun.command["trigger_str"]) - comrun.say(comrun.command["trigger_str"]) + echo_count = 3 + trigger_str = comrun.command["trigger_str"] + if trigger_str.split(" ")[0].isdigit(): + echo_count = int(trigger_str.split(" ")[0]) + trigger_str = " ".join(trigger_str.split(" ")[1:]) + + for x in range(echo_count): + comrun.say(comrun.command["trigger_str"])