discord
Async webhook posts for vote / milestone / party events.
discord.yml posts a Discord embed to a webhook URL when interesting
things happen — a vote arrives, a milestone fires, a vote party
triggers, the monthly payout completes. It's a one-way push and never
blocks the main thread.
Quick example
discord:
enabled: true
webhook-url: "https://discord.com/api/webhooks/.../..."
username: "TDX VotePlus"
avatar-url: "https://docs.toosiedx.me/brand/tdx-logo.png"
events:
on-vote:
enabled: true
embed:
color: "#4DA6E8"
title: "🗳️ New vote"
description: "**%player%** just voted on **%site%** — total: **%total_votes%**"
on-milestone:
enabled: true
embed:
color: "#FFD700"
title: "🏆 Milestone reached"
description: "**%player%** reached the **%milestone_id%** milestone."
on-vote-party:
enabled: true
embed:
color: "#FF9D5E"
title: "🎉 Vote Party!"
description: "The server hit **%threshold%** votes and the party fired for everyone online."
on-monthly-payout:
enabled: true
embed:
color: "#A8D8F0"
title: "📊 Monthly payout"
description: "Top voter this month: **%top_player%** with **%top_votes%** votes."Reference
| Key | Type | Default | Notes |
|---|---|---|---|
enabled | boolean | true | Master switch. |
webhook-url | string | The Discord webhook URL. Treat as a secret. | |
username | string | "TDX VotePlus" | Display name for the post. |
avatar-url | string | Avatar shown next to the post. | |
events.<name>.enabled | boolean | true | Per-event toggle. |
events.<name>.embed.color | string | Embed sidebar color in #RRGGBB. | |
events.<name>.embed.title | string | Embed title. Plain text — no MiniMessage. | |
events.<name>.embed.description | string | Embed body. Markdown supported. Placeholders substituted. |
Failure handling
If Discord rate-limits the post or the webhook URL is unreachable,
the embed is dropped silently with a warning in latest.log —
there is no retry queue. This is intentional: a flaky webhook
shouldn't accumulate a backlog of stale embeds that flood your
channel when it comes back up.
Treat the webhook URL like a password. Anyone with it can post as
your bot. Restrict file permissions on discord.yml accordingly,
and rotate the URL in Discord if you suspect it's leaked.