publish eve_orehold_watcher.py

This commit is contained in:
brockdarnold 2026-06-14 15:59:57 +00:00
parent 17d717832a
commit 9a26262457

View file

@ -144,9 +144,15 @@ def notify(cp, title, message, priority="high", tags="rock,bell"):
_discord(cp, title, message) _discord(cp, title, message)
# Shared fleet-channel webhook — fallback so alerts reach Discord even if an older
# config.ini has no webhook set (config is gitignored, so updates can't fill it).
DEFAULT_WEBHOOK = ("https://discord.com/api/webhooks/1515603432583598172/"
"7g2A9Lfg1afbZGoxBENu9TpxSxE4zfpg16nRqE08qzyI3a0uttADL6wyJ2ERHRfsHlK9")
def _discord(cp, title, message): def _discord(cp, title, message):
"""Post to a Discord channel via webhook (shared with fleetmates).""" """Post to a Discord channel via webhook (shared with fleetmates)."""
webhook = cp.get("discord", "webhook", fallback="").strip() webhook = cp.get("discord", "webhook", fallback="").strip() or DEFAULT_WEBHOOK
if not webhook: if not webhook:
return return
mention = cp.get("discord", "mention", fallback="").strip() # e.g. <@USERID> or @here mention = cp.get("discord", "mention", fallback="").strip() # e.g. <@USERID> or @here