mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-12 22:49:53 -05:00
test new hyphen args logic
This commit is contained in:
parent
c1538ea787
commit
18fa151bec
@ -24,8 +24,13 @@ class BotPrerun():
|
|||||||
def actual_decorator(function):
|
def actual_decorator(function):
|
||||||
@functools.wraps(function)
|
@functools.wraps(function)
|
||||||
def internal_prerun(bot, trigger, *args, **kwargs):
|
def internal_prerun(bot, trigger, *args, **kwargs):
|
||||||
bot.say("here")
|
trigger.sb["args"], trigger.sb["hyphen_arg"] = self.trigger_hyphen_args(trigger.sb["args"])
|
||||||
return function(bot, trigger, *args, **kwargs)
|
if not trigger.sb["hyphen_arg"]:
|
||||||
|
# check if anything prohibits the nick from running the command
|
||||||
|
if self.trigger_runstatus(bot, trigger):
|
||||||
|
return function(bot, trigger, *args, **kwargs)
|
||||||
|
else:
|
||||||
|
return self.trigger_hyphen_arg_handler(bot, trigger)
|
||||||
return internal_prerun
|
return internal_prerun
|
||||||
return actual_decorator
|
return actual_decorator
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user