This commit is contained in:
deathbybandaid 2022-02-10 10:03:17 -05:00
parent b7d016a750
commit e86ea9494c

View File

@ -1,16 +1,20 @@
import functools import functools
from sopel_SpiceBotCore import sb
def prerun(t_command_type='module', t_command_subtype=None):
def prerun(t_command_type='module'):
def actual_decorator(function): def actual_decorator(function):
@functools.wraps(function) @functools.wraps(function)
def internal_prerun(bot, trigger, sb, *args, **kwargs): def internal_prerun(bot, trigger, *args, **kwargs):
bot.say(str(id(trigger))) bot.say(str(id(trigger)))
sb.osd("test", trigger.sender) sb.osd("test", trigger.sender)
function(bot, trigger, *args, **kwargs)
return internal_prerun return internal_prerun
return actual_decorator return actual_decorator