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,12 +21,15 @@ if not token:
async def main(loop): async def main(loop):
if "ingest" in modules_enabled:
ingest = Ingest() ingest = Ingest()
loop.create_task(ingest.run()) loop.create_task(ingest.run())
if "dis" in modules_enabled:
client = DiscordClient() client = DiscordClient()
loop.create_task(client.start(token)) loop.create_task(client.start(token))
if "ch4" in modules_enabled:
chan = Chan4() chan = Chan4()
loop.create_task(chan.run()) loop.create_task(chan.run())