diff options
author | 2021-03-10 17:51:57 +0000 | |
---|---|---|
committer | 2021-03-10 17:52:15 +0000 | |
commit | a40967bab9ae60bc78c96a978350cb7a79372ac6 (patch) | |
tree | 0fe3bac4c030d032b6ce4716188ccf4052348f39 /bot/__init__.py | |
parent | Update Dockerfile (diff) |
Load environment variables from .env
Diffstat (limited to 'bot/__init__.py')
-rw-r--r-- | bot/__init__.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bot/__init__.py b/bot/__init__.py index bdb18666..ffd43d1f 100644 --- a/bot/__init__.py +++ b/bot/__init__.py @@ -1,3 +1,10 @@ +try: + from dotenv import load_dotenv + print("Found .env file, loading environment variables from it.") + load_dotenv(override=True) +except ModuleNotFoundError: + pass + import asyncio import logging import logging.handlers |