Webhook Definition
A reusable Discord webhook destination
A Discord destination, declared once and referenced everywhere. Each subsystem used to carry its own copy of the settings (URL, username, avatar): changing channel meant editing every manifest, and nothing guaranteed they pointed at the same place. The destination becomes an entry of its own, which makes it reusable — a bug report, a shop sale and a player death can target the same channel without the URL being copied three times. Any extension can consume it: put a Ref<WebhookDefinitionEntry> on your entry and call [WebhookService].
Felder
| Feld | Typ | Standard | Beschreibung |
|---|---|---|---|
enabled | Boolean | true | Silences delivery to this destination without having to remove the references pointing at it. |
url | String | — | Full Discord webhook URL. |
username | String | — | Username shown instead of the webhook's own. Empty = the one configured on Discord. |
avatarUrl | String | — | Avatar URL shown instead of the webhook's own. Empty = the one configured on Discord. |
pingRoleIds | List<String> | empty | Roles mentioned by EVERY message going through this destination. One-off mentions stay the caller's business. |
How to use it
Create one Webhook Definition per Discord channel and reference it from the other entries (webhook, destination). To get the URL, open the channel settings in Discord, then Integrations, Webhooks.
enabledoff silences the destination without removing the references to it.usernameandavatarUrloverride the name and picture configured on Discord. Empty keeps Discord's.pingRoleIdslists Discord role IDs mentioned by every message sent through this destination. Other entries can add their own role pings on top.- A shop names its destination by the ID of this entry in its own
notificationWebhookIdfield.