test
This commit is contained in:
parent
c5bc9d0839
commit
1069f87333
@ -57,8 +57,10 @@ def prerun():
|
||||
# Run function
|
||||
function(bot, trigger, comrun, *args, **kwargs)
|
||||
|
||||
# if not comrun.is_pipe_command:
|
||||
# bot.say(comrun.say)
|
||||
# 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)
|
||||
|
||||
return internal_prerun
|
||||
return actual_decorator
|
||||
@ -104,6 +106,10 @@ class ComRun():
|
||||
self.bot = bot
|
||||
self.trigger = trigger
|
||||
self.function = function
|
||||
self._say = []
|
||||
|
||||
def say(self, message):
|
||||
self._say.append(message)
|
||||
|
||||
@property
|
||||
def is_real_command(self):
|
||||
|
||||
@ -8,14 +8,13 @@ from sopel_SpiceBot_Core_Prerun import prerun
|
||||
@prerun()
|
||||
@plugin.command('testoa')
|
||||
def commands_output_a(bot, trigger, comrun):
|
||||
bot.say("%s" % trigger.raw)
|
||||
bot.say("%s" % comrun.trigger.raw)
|
||||
comrun.say("this is test a")
|
||||
|
||||
|
||||
@prerun()
|
||||
@plugin.command('testob')
|
||||
def commands_output_b(bot, trigger, comrun):
|
||||
bot.say("%s" % trigger.raw)
|
||||
comrun.say("this is test b")
|
||||
|
||||
|
||||
@prerun()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user