This commit is contained in:
deathbybandaid 2022-05-06 10:18:59 -04:00
parent c588eb3091
commit e2c6150d4e

View File

@ -1,5 +1,6 @@
import functools
import re
import inspect
from sopel.trigger import Trigger
@ -14,10 +15,16 @@ def prerun():
@functools.wraps(function)
def internal_prerun(bot, trigger, *args, **kwargs):
print(function._decorators)
comrun = ComRun(bot, trigger, function)
source = inspect.getsource(function)
index = source.find("def ")
print([
line.strip().split()[0]
for line in source[:index].strip().splitlines()
if line.strip()[0] == "@"
])
# Since there was more than one command,
# we are going to redispatch commands
# This will give sopel the appearance of recieving individual commands