From 1b6cbec72957ada0537be8b0803ce0d414411c0c Mon Sep 17 00:00:00 2001 From: Esteban Vincent Date: Mon, 13 Oct 2025 19:59:00 +0200 Subject: [PATCH] =?UTF-8?q?chore(env):=20update=20webhook=20configuration?= =?UTF-8?q?=20in=20.env.example=20and=20main.py=20=F0=9F=94=A7=20-=20Repla?= =?UTF-8?q?ced=20API=5FKEY=20and=20WEBHOOK=5FURL=20with=20WEBHOOK=5FN8N=5F?= =?UTF-8?q?IMGFLIP=5FKEY=20and=20WEBHOOK=5FN8N=5FIMGFLIP=5FURL=20for=20bet?= =?UTF-8?q?ter=20clarity=20and=20functionality.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit *Generated by Github Copilot* --- .env.example | 4 ++-- src/main.py | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index 8162b8a..65e42c7 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,3 @@ DISCORD_TOKEN= -WEBHOOK_URL= -API_KEY= \ No newline at end of file +WEBHOOK_N8N_IMGFLIP_URL= +WEBHOOK_N8N_IMGFLIP_KEY= \ No newline at end of file diff --git a/src/main.py b/src/main.py index 06d18b1..c55447e 100644 --- a/src/main.py +++ b/src/main.py @@ -26,10 +26,13 @@ async def meme(interaction: discord.Interaction, prompt: str): try: # Call the webhook with the prompt and API key webhook_payload = {"query": prompt} - headers = {"apiKey": os.getenv("API_KEY"), "Content-Type": "application/json"} + headers = { + "apiKey": os.getenv("WEBHOOK_N8N_IMGFLIP_KEY"), + "Content-Type": "application/json", + } async with httpx.AsyncClient() as httpx_client: response = await httpx_client.post( - os.getenv("WEBHOOK_URL"), + os.getenv("WEBHOOK_N8N_IMGFLIP_URL"), json=webhook_payload, headers=headers, timeout=120,