better DISCORD_TOKEN
error
This commit is contained in:
parent
f62f2496df
commit
30c9186385
@ -13,7 +13,15 @@ from .db import AbstractDbFactory
|
|||||||
|
|
||||||
async def _main():
|
async def _main():
|
||||||
token = os.getenv("DISCORD_TOKEN")
|
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 <token here> with the token):
|
||||||
|
DISCORD_TOKEN = <token here>\
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
exit(1)
|
||||||
dbfm = os.getenv("DBF_MODULE")
|
dbfm = os.getenv("DBF_MODULE")
|
||||||
assert dbfm is not None
|
assert dbfm is not None
|
||||||
DBF: AbstractDbFactory = importlib.import_module(dbfm).DBF
|
DBF: AbstractDbFactory = importlib.import_module(dbfm).DBF
|
||||||
|
Loading…
Reference in New Issue
Block a user