Skip to content

Instantly share code, notes, and snippets.

@TheWhiteJZ
TheWhiteJZ / gist:2a8e1f62cc8457ca7558522f655a62ec
Created May 27, 2026 18:09
Forward messages to Discord via webhook (stdlib only, no dependencies)
#!/usr/bin/env python3
"""
discord_notify.py — Send a message to a Discord channel via webhook.
No third-party dependencies required (uses stdlib only).
Usage
-----
1. Set your webhook URL in an environment variable:
export DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/..."