diff --git a/sopel_modules/SpiceBot/Channels.py b/sopel_modules/SpiceBot/Channels.py index 622ca24..433b984 100644 --- a/sopel_modules/SpiceBot/Channels.py +++ b/sopel_modules/SpiceBot/Channels.py @@ -70,3 +70,6 @@ class BotChannels(): bot.write(('SAMODE', channel, "+a", bot.nick)) else: bot.part(channel) + + +botchannels = BotChannels() diff --git a/sopel_modules/SpiceBot/Commands.py b/sopel_modules/SpiceBot/Commands.py index f479f73..5a4eb99 100644 --- a/sopel_modules/SpiceBot/Commands.py +++ b/sopel_modules/SpiceBot/Commands.py @@ -51,3 +51,6 @@ class BotCommands(): for comalias in comaliases: if comalias not in self.SpiceBot_Commands['commands'][command_type].keys(): self.SpiceBot_Commands['commands'][command_type][comalias] = {"aliasfor": aliasfor} + + +botcommands = BotCommands() diff --git a/sopel_modules/SpiceBot/Database.py b/sopel_modules/SpiceBot/Database.py index 2328881..4cd8390 100644 --- a/sopel_modules/SpiceBot/Database.py +++ b/sopel_modules/SpiceBot/Database.py @@ -246,3 +246,6 @@ class BotDatabase(): bot.db.set_channel_value(channel, sorting_key, self.SpiceBot_Database["channels"][channel][sorting_key]) self.lock.release() + + +botdb = BotDatabase() diff --git a/sopel_modules/SpiceBot/Events.py b/sopel_modules/SpiceBot/Events.py index b277a77..34dfc54 100644 --- a/sopel_modules/SpiceBot/Events.py +++ b/sopel_modules/SpiceBot/Events.py @@ -124,3 +124,6 @@ class BotEvents(object): return function(*args, **kwargs) return _nop return actual_decorator + + +botevents = BotEvents() diff --git a/sopel_modules/SpiceBot/Logs.py b/sopel_modules/SpiceBot/Logs.py index fe7b0e0..2308c30 100644 --- a/sopel_modules/SpiceBot/Logs.py +++ b/sopel_modules/SpiceBot/Logs.py @@ -101,3 +101,6 @@ class BotLogs(): pidnum = e pidnum = str(os.popen("systemctl show " + str(bot.nick) + " --property=MainPID").read()).split("=")[-1] return pidnum + + +botlogs = BotLogs() diff --git a/sopel_modules/SpiceBot/Tools.py b/sopel_modules/SpiceBot/Tools.py index fa95b21..ed4ec4b 100644 --- a/sopel_modules/SpiceBot/Tools.py +++ b/sopel_modules/SpiceBot/Tools.py @@ -20,7 +20,7 @@ from pygit2 import clone_repository import spicemanip -import sopel_modules.SpiceBot as SpiceBot +from .Logs import botlogs """Variable References""" diff --git a/sopel_modules/SpiceBot/__init__.py b/sopel_modules/SpiceBot/__init__.py index 3f196cd..2606e87 100644 --- a/sopel_modules/SpiceBot/__init__.py +++ b/sopel_modules/SpiceBot/__init__.py @@ -16,10 +16,3 @@ from .Database import * __author__ = 'Sam Zick' __email__ = 'sam@deathbybandaid.net' __version__ = '0.1.1' - - -botdb = BotDatabase() -botchannels = BotChannels() -botcommands = BotCommands() -botevents = BotEvents() -botlogs = BotLogs()