Spaces:
Runtime error
Runtime error
fix(config): ensure dotenv is loaded for environment variables
Browse files- bot/config.py +2 -0
- requirements.txt +2 -1
bot/config.py
CHANGED
@@ -4,6 +4,8 @@ from __future__ import annotations
|
|
4 |
|
5 |
import os
|
6 |
from typing import Final
|
|
|
|
|
7 |
|
8 |
# Discord bot token
|
9 |
DISCORD_TOKEN: Final[str | None] = os.getenv("DISCORD_TOKEN")
|
|
|
4 |
|
5 |
import os
|
6 |
from typing import Final
|
7 |
+
from dotenv import load_dotenv
|
8 |
+
load_dotenv()
|
9 |
|
10 |
# Discord bot token
|
11 |
DISCORD_TOKEN: Final[str | None] = os.getenv("DISCORD_TOKEN")
|
requirements.txt
CHANGED
@@ -2,4 +2,5 @@ colorlog
|
|
2 |
ollama
|
3 |
peewee
|
4 |
discord.py
|
5 |
-
colorama
|
|
|
|
2 |
ollama
|
3 |
peewee
|
4 |
discord.py
|
5 |
+
colorama
|
6 |
+
python-dotenv
|