1 parent 84e3647 commit 5980edbCopy full SHA for 5980edb
2 files changed
docker-compose.yaml
@@ -1,5 +1,5 @@
1
services:
2
- bot:
+ faststicker-tgbot:
3
image: ghcr.io/okiscape/faststicker-tgbot:latest
4
restart: unless-stopped
5
container_name: faststicker-tgbot
utils/stores/config.py
@@ -1,6 +1,8 @@
-from dotenv import dotenv_values
+import os
-_env = dotenv_values()
+from dotenv import load_dotenv
+
+load_dotenv()
6
7
import pytz
8
from aiogram.client.default import DefaultBotProperties
@@ -14,4 +16,9 @@
14
16
15
17
18
class env:
- BOT_TOKEN = _env["BOT_TOKEN"]
19
+ BOT_TOKEN = os.environ.get("BOT_TOKEN")
20
21
22
+if not env.BOT_TOKEN:
23
+ print("BOT_TOKEN was not found!!!")
24
+ exit(1)
0 commit comments