test
This commit is contained in:
parent
94104603ac
commit
a015850451
@ -109,7 +109,9 @@ def dispatch():
|
|||||||
def actual_decorator(function):
|
def actual_decorator(function):
|
||||||
|
|
||||||
@functools.wraps(function)
|
@functools.wraps(function)
|
||||||
def internal_prerun(bot, trigger, *args, **kwargs):
|
def internal_dispatch(bot, trigger, *args, **kwargs):
|
||||||
|
|
||||||
|
bot.say("dispatch")
|
||||||
|
|
||||||
# Get list of trigger command(s)
|
# Get list of trigger command(s)
|
||||||
commands = get_commands(bot, trigger)
|
commands = get_commands(bot, trigger)
|
||||||
@ -122,7 +124,22 @@ def dispatch():
|
|||||||
|
|
||||||
function(bot, trigger, *args, **kwargs)
|
function(bot, trigger, *args, **kwargs)
|
||||||
|
|
||||||
return internal_prerun
|
return internal_dispatch
|
||||||
|
return actual_decorator
|
||||||
|
|
||||||
|
|
||||||
|
def testfun():
|
||||||
|
|
||||||
|
def actual_decorator(function):
|
||||||
|
|
||||||
|
@functools.wraps(function)
|
||||||
|
def internal_testfun(bot, trigger, *args, **kwargs):
|
||||||
|
|
||||||
|
bot.say("testfun")
|
||||||
|
|
||||||
|
function(bot, trigger, *args, **kwargs)
|
||||||
|
|
||||||
|
return internal_testfun
|
||||||
return actual_decorator
|
return actual_decorator
|
||||||
|
|
||||||
|
|
||||||
@ -130,10 +147,13 @@ def prerun():
|
|||||||
|
|
||||||
def actual_decorator(function):
|
def actual_decorator(function):
|
||||||
|
|
||||||
|
@testfun()
|
||||||
@dispatch()
|
@dispatch()
|
||||||
@functools.wraps(function)
|
@functools.wraps(function)
|
||||||
def internal_prerun(bot, trigger, *args, **kwargs):
|
def internal_prerun(bot, trigger, *args, **kwargs):
|
||||||
|
|
||||||
|
bot.say("prerun")
|
||||||
|
|
||||||
function(bot, trigger, *args, **kwargs)
|
function(bot, trigger, *args, **kwargs)
|
||||||
|
|
||||||
return internal_prerun
|
return internal_prerun
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user