Allow disabling modules in environment variables

This commit is contained in:
Mark Veidemanis 2022-12-22 07:20:26 +00:00
parent ce2d7684bc
commit ebaf8c765d
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 9 additions and 6 deletions

View File

@ -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()