test
This commit is contained in:
parent
dcf2ef69be
commit
0d946b6c49
@ -1,7 +1,11 @@
|
|||||||
print("SpiceBotCore importing")
|
|
||||||
|
|
||||||
|
|
||||||
class SpiceBotCore_OBJ():
|
class SpiceBotCore_OBJ():
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
print("SpiceBotCore imported")
|
self.script_dir = None
|
||||||
|
self.bot = None
|
||||||
|
|
||||||
|
def setup(self, script_dir, bot):
|
||||||
|
self.script_dir = script_dir
|
||||||
|
self.bot = bot
|
||||||
|
|||||||
@ -9,19 +9,16 @@ import pathlib
|
|||||||
|
|
||||||
from .SpiceBotCore import SpiceBotCore_OBJ
|
from .SpiceBotCore import SpiceBotCore_OBJ
|
||||||
|
|
||||||
|
|
||||||
from sopel import plugin
|
from sopel import plugin
|
||||||
|
|
||||||
|
|
||||||
"""
|
|
||||||
`SCRIPT_DIR` is a very important variable to set early on.
|
|
||||||
This is the directory `main.py` has been called from.
|
|
||||||
This information will be use to dynamically set other variables later, as well as some default locations.
|
|
||||||
"""
|
|
||||||
SCRIPT_DIR = pathlib.Path(os.path.dirname(os.path.abspath(__file__)))
|
SCRIPT_DIR = pathlib.Path(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
|
spicebotcore = SpiceBotCore_OBJ
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
SpiceBotCore_OBJ.script_dir = SCRIPT_DIR
|
spicebotcore.setup(SCRIPT_DIR, bot)
|
||||||
|
|
||||||
|
|
||||||
@plugin.nickname_command('test')
|
@plugin.nickname_command('test')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user