let's add a server.py to the root, to be used to start up the application when run on a server (vs. local dev). To keep it DRY, we'll want to factor out common functionality, e.g. instantiating cogs. So it should be more like it was, where bot is an importable module, which would be imported into main.py and into server.py.
main.py should be VERY simple -- just import the bot and run it.
server.py will have extra bits like adding logging connectors, etc.
let's add a
server.py
to the root, to be used to start up the application when run on a server (vs. local dev). To keep it DRY, we'll want to factor out common functionality, e.g. instantiating cogs. So it should be more like it was, wherebot
is an importable module, which would be imported intomain.py
and intoserver.py
.main.py
should be VERY simple -- just import the bot and run it.server.py
will have extra bits like adding logging connectors, etc.