From ebaf8c765d59aae9a1661be9e5ad1214f9802289 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Thu, 22 Dec 2022 07:20:26 +0000 Subject: [PATCH] Allow disabling modules in environment variables --- monolith.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/monolith.py b/monolith.py index d19c2e7..a04f7d7 100644 --- a/monolith.py +++ b/monolith.py @@ -21,14 +21,17 @@ if not token: async def main(loop): - ingest = Ingest() - loop.create_task(ingest.run()) + if "ingest" in modules_enabled: + ingest = Ingest() + loop.create_task(ingest.run()) - client = DiscordClient() - loop.create_task(client.start(token)) + if "dis" in modules_enabled: + client = DiscordClient() + loop.create_task(client.start(token)) - chan = Chan4() - loop.create_task(chan.run()) + if "ch4" in modules_enabled: + chan = Chan4() + loop.create_task(chan.run()) loop = asyncio.get_event_loop()