import requests import time import pygetwindow as gw def send_discord_message(webhook_url, message): data = { "content": message } requests.post(webhook_url, json=data) def check_window_titles(window_title, webhook_url): windows = gw.getAllTitles() for title in window_title: if title not in windows: send_discord_message(webhook_url, "DIKKAT! **"f"{title}** adlı client kapanmış, geri aç! <@381803793198612482>") if __name__ == "__main__": window_titles = ["KIRMIZI - CixMetin2"] webhook_url = "https://discord.com/api/webhooks/1235328862515363851/dDzO4WPWeb_gVoZCZ7UiipNvfI7SXr7G7IfZsSvqOgLBCMwQW_BaZHvP6DrKNQfw198b" while True: check_window_titles(window_titles, webhook_url) time.sleep(5)