Skip to content

Commit

Permalink
🐛 Resolved bug (#7) due to api updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthurdw committed Sep 16, 2023
1 parent 2654424 commit bf43eef
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ def __init__(self, _p: Prettier, _ph: PrintHandler):
self.ph.info("No updates found, starting bot...")

self.ph.info("Started loading extensions.")
extensions = list(map(lambda extension: extension.replace(back_slash, ".")[:-3], glob("extensions/*.py")))

for index, _ in enumerate(self.load_extensions(extensions)):
if strtobool(cfg["CONSOLE"].get("print_imports", "true")):
self.ph.info(f"Successfully loaded "
f"{Colors.light_magenta.value + extensions[index].replace('extensions.', '')}")

@staticmethod
def restart():
Expand All @@ -93,6 +87,20 @@ def check_for_updates(self):
self.restart()

async def on_ready(self):
from extensions.ReactionLogger import ReactionLogger
from extensions.ReactionRoles import ReactionRoles

extensions = [ReactionRoles]

if strtobool(cfg["REACTION_LOGGING"].get("enabled", "true")):
extensions.append(ReactionLogger)

for index, extension in enumerate(extensions):
await self.add_cog(extension(self))
if strtobool(cfg["CONSOLE"].get("print_imports", "true")):
self.ph.info(f"Successfully loaded "
f"{Colors.light_magenta.value + extension.__name__}")

self.ph.info(f"Currently running on v{self.vm.version}!")
print()

Expand Down

0 comments on commit bf43eef

Please sign in to comment.