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