Created
November 15, 2024 18:09
Revisions
-
0xjmux created this gist
Nov 15, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ import requests # Also see: https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks USERNAME = "Python Notifier" WEBHOOK_URL = "" def send_alert(contents: str): data = {"content": contents, "username": USERNAME} try: requests.post(WEBHOOK_URL, json=data) except Exception as e: print(f"Error sending alert: {e}")