20 lines
466 B
Python
20 lines
466 B
Python
|
|
|
|
from sopel import plugin
|
|
|
|
from sopel_SpiceBot_Core_Prerun import sbprerun
|
|
|
|
|
|
@sbprerun()
|
|
@plugin.nickname_command('echo')
|
|
@plugin.command('echo')
|
|
def echo(bot, trigger, comrun):
|
|
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(trigger_str)
|