test
This commit is contained in:
parent
c588eb3091
commit
e2c6150d4e
@ -1,5 +1,6 @@
|
|||||||
import functools
|
import functools
|
||||||
import re
|
import re
|
||||||
|
import inspect
|
||||||
|
|
||||||
from sopel.trigger import Trigger
|
from sopel.trigger import Trigger
|
||||||
|
|
||||||
@ -14,10 +15,16 @@ def prerun():
|
|||||||
@functools.wraps(function)
|
@functools.wraps(function)
|
||||||
def internal_prerun(bot, trigger, *args, **kwargs):
|
def internal_prerun(bot, trigger, *args, **kwargs):
|
||||||
|
|
||||||
print(function._decorators)
|
|
||||||
|
|
||||||
comrun = ComRun(bot, trigger, function)
|
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,
|
# Since there was more than one command,
|
||||||
# we are going to redispatch commands
|
# we are going to redispatch commands
|
||||||
# This will give sopel the appearance of recieving individual commands
|
# This will give sopel the appearance of recieving individual commands
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user