From babdc1ee85adee301a56acecbb8d363ea5fed6aa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 10 Jan 2026 17:03:26 +0000 Subject: [PATCH] Remove integrations folder that was accidentally re-added Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com> --- .../autometabuilder/integrations/__init__.py | 0 .../integrations/notifications.py | 55 ------------------- 2 files changed, 55 deletions(-) delete mode 100644 backend/autometabuilder/integrations/__init__.py delete mode 100644 backend/autometabuilder/integrations/notifications.py diff --git a/backend/autometabuilder/integrations/__init__.py b/backend/autometabuilder/integrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/backend/autometabuilder/integrations/notifications.py b/backend/autometabuilder/integrations/notifications.py deleted file mode 100644 index 2564a66..0000000 --- a/backend/autometabuilder/integrations/notifications.py +++ /dev/null @@ -1,55 +0,0 @@ -import os -import logging -from slack_sdk import WebClient -from slack_sdk.errors import SlackApiError -import discord -import asyncio - -logger = logging.getLogger("autometabuilder.notifications") - -def send_slack_notification(message: str): - token = os.environ.get("SLACK_BOT_TOKEN") - channel = os.environ.get("SLACK_CHANNEL") - if not token or not channel: - logger.warning("Slack notification skipped: SLACK_BOT_TOKEN or SLACK_CHANNEL missing.") - return - - client = WebClient(token=token) - try: - client.chat_postMessage(channel=channel, text=message) - logger.info("Slack notification sent successfully.") - except SlackApiError as e: - logger.error(f"Error sending Slack notification: {e}") - -async def send_discord_notification_async(message: str): - token = os.environ.get("DISCORD_BOT_TOKEN") - channel_id = os.environ.get("DISCORD_CHANNEL_ID") - if not token or not channel_id: - logger.warning("Discord notification skipped: DISCORD_BOT_TOKEN or DISCORD_CHANNEL_ID missing.") - return - - intents = discord.Intents.default() - client = discord.Client(intents=intents) - - @client.event - async def on_ready(): - channel = client.get_channel(int(channel_id)) - if channel: - await channel.send(message) - logger.info("Discord notification sent successfully.") - await client.close() - - try: - await client.start(token) - except Exception as e: - logger.error(f"Error sending Discord notification: {e}") - -def send_discord_notification(message: str): - try: - asyncio.run(send_discord_notification_async(message)) - except Exception as e: - logger.error(f"Error running Discord notification: {e}") - -def notify_all(message: str): - send_slack_notification(message) - send_discord_notification(message)