test
This commit is contained in:
parent
c2148fa7e3
commit
6170d930fc
@ -3,6 +3,11 @@ import functools
|
|||||||
from sopel_SpiceBot_Core_1 import sb
|
from sopel_SpiceBot_Core_1 import sb
|
||||||
|
|
||||||
|
|
||||||
|
class ComRun():
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def dispatch():
|
def dispatch():
|
||||||
"""
|
"""
|
||||||
This splits the given command by `&&` and re-dispatches it internally to the bot.
|
This splits the given command by `&&` and re-dispatches it internally to the bot.
|
||||||
@ -57,10 +62,12 @@ def prerun():
|
|||||||
def internal_prerun(bot, trigger, *args, **kwargs):
|
def internal_prerun(bot, trigger, *args, **kwargs):
|
||||||
|
|
||||||
bot.say("prerun")
|
bot.say("prerun")
|
||||||
comrun = "test comrun"
|
comrun = ComRun()
|
||||||
|
|
||||||
function(bot, trigger, comrun, *args, **kwargs)
|
function(bot, trigger, comrun, *args, **kwargs)
|
||||||
|
|
||||||
|
print(comrun.test)
|
||||||
|
|
||||||
return internal_prerun
|
return internal_prerun
|
||||||
return actual_decorator
|
return actual_decorator
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@ from sopel_SpiceBot_Core_Prerun import prerun
|
|||||||
@plugin.command('test', "testnew")
|
@plugin.command('test', "testnew")
|
||||||
def commands_test(bot, trigger, comrun):
|
def commands_test(bot, trigger, comrun):
|
||||||
bot.say("%s" % trigger.raw)
|
bot.say("%s" % trigger.raw)
|
||||||
bot.say(comrun)
|
comrun.test = "this is a real test"
|
||||||
|
|
||||||
|
|
||||||
@prerun()
|
@prerun()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user