This commit is contained in:
deathbybandaid 2023-01-24 09:12:21 -05:00
parent 9477ec3192
commit 9b48c1a749
2 changed files with 7 additions and 4 deletions

View File

@ -48,7 +48,7 @@ class SpiceBotCore_OBJ():
self.logger.info("SpiceBot Commands Interface Setup Complete.")
# SpiceBots access to Sopel Command listing
self.users = Users(self.bot)
self.users = Users(self.config, self.bot)
self.logger.info("SpiceBot Users Interface Setup Complete.")
def setup(self, bot):
@ -56,6 +56,8 @@ class SpiceBotCore_OBJ():
# store an access interface to sopel.bot
self.bot = bot
self.commands.bot = bot
self.users.bot = bot
# Re-initialize the bot config properly during plugin setup routine
self.config.config = bot.config

View File

@ -5,8 +5,9 @@ from sopel import plugin
class Users():
def __init__(self, bot):
def __init__(self, config, bot):
self.bot = None
self.config = config
self.bot_priv_dict = {
"OWNER": 10,
@ -51,7 +52,7 @@ class Users():
"""Bot Owner"""
def list_bot_owner(self):
list_owner = self.bot.config.owner
list_owner = self.config.owner
if not isinstance(list_owner, list):
list_owner = [list_owner]
return list_owner
@ -64,7 +65,7 @@ class Users():
"""Bot Admins"""
def list_bot_admin(self):
list_admins = self.bot.config.admins
list_admins = self.config.admins
if not isinstance(list_admins, list):
list_admins = [list_admins]
return list_admins