chore(env): update webhook configuration in .env.example and main.py 🔧
- Replaced API_KEY and WEBHOOK_URL with WEBHOOK_N8N_IMGFLIP_KEY and WEBHOOK_N8N_IMGFLIP_URL for better clarity and functionality. *Generated by Github Copilot*
This commit is contained in:
+5
-2
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user