Various changes
This commit is contained in:
@@ -8,6 +8,4 @@ COPY . .
|
|||||||
RUN pip install --no-cache-dir --upgrade pip
|
RUN pip install --no-cache-dir --upgrade pip
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
RUN echo DISCORD_BOT_TOKEN=$DISCORD_BOT_TOKEN > .env
|
|
||||||
|
|
||||||
CMD ["python3", "bot.py"]
|
CMD ["python3", "bot.py"]
|
||||||
8
bot.py
8
bot.py
@@ -1,5 +1,6 @@
|
|||||||
import discord
|
import discord
|
||||||
import dotenv
|
import dotenv
|
||||||
|
import os
|
||||||
|
|
||||||
text_triggers = {
|
text_triggers = {
|
||||||
"lessthan": "WHAT ARE YOU WAITING FOR?",
|
"lessthan": "WHAT ARE YOU WAITING FOR?",
|
||||||
@@ -13,9 +14,12 @@ text_triggers = {
|
|||||||
|
|
||||||
lessthan = None
|
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 = discord.Intents.default()
|
||||||
intents.message_content = True
|
intents.message_content = True
|
||||||
@@ -45,6 +49,6 @@ async def on_message(message):
|
|||||||
def process_string(string:str) -> str:
|
def process_string(string:str) -> str:
|
||||||
return "".join(string.lower().split())
|
return "".join(string.lower().split())
|
||||||
|
|
||||||
|
print(api_key)
|
||||||
|
|
||||||
client.run(api_key)
|
client.run(api_key)
|
||||||
Reference in New Issue
Block a user