publish eve_orehold_watcher.py
This commit is contained in:
parent
17d717832a
commit
9a26262457
1 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue