diff --git a/starbot/starbot/__main__.py b/starbot/starbot/__main__.py index d8840e7..4724d19 100644 --- a/starbot/starbot/__main__.py +++ b/starbot/starbot/__main__.py @@ -13,7 +13,15 @@ from .db import AbstractDbFactory async def _main(): token = os.getenv("DISCORD_TOKEN") - assert token is not None + if token is None: + print( + """\ +DISCORD_TOKEN environment variable is not set +edit .secrets/starbot.env with the following content (substitute with the token): +DISCORD_TOKEN = \ +""" + ) + exit(1) dbfm = os.getenv("DBF_MODULE") assert dbfm is not None DBF: AbstractDbFactory = importlib.import_module(dbfm).DBF