From 874acb7af3625c3187b462b0200c5f95eec37eae Mon Sep 17 00:00:00 2001 From: scarzehd Date: Mon, 24 Nov 2025 01:10:50 -0500 Subject: [PATCH] Various changes --- Dockerfile | 2 -- bot.py | 8 ++++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8175237..6f74a2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,4 @@ COPY . . RUN pip install --no-cache-dir --upgrade pip RUN pip install --no-cache-dir -r requirements.txt -RUN echo DISCORD_BOT_TOKEN=$DISCORD_BOT_TOKEN > .env - CMD ["python3", "bot.py"] \ No newline at end of file diff --git a/bot.py b/bot.py index 3025055..7ce87aa 100644 --- a/bot.py +++ b/bot.py @@ -1,5 +1,6 @@ import discord import dotenv +import os text_triggers = { "lessthan": "WHAT ARE YOU WAITING FOR?", @@ -13,9 +14,12 @@ text_triggers = { lessthan = None +with open(".env") as env: + print(env.readline()) +dotenv.load_dotenv(".env") -api_key = dotenv.dotenv_values(".env")["DISCORD_BOT_TOKEN"] +api_key = os.getenv("DISCORD_BOT_TOKEN") intents = discord.Intents.default() intents.message_content = True @@ -45,6 +49,6 @@ async def on_message(message): def process_string(string:str) -> str: return "".join(string.lower().split()) - +print(api_key) client.run(api_key) \ No newline at end of file