Saltar al contenido principal

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].

Campos

CampoTipoPredeterminadoDescripción
enabledBooleantrueSilences delivery to this destination without having to remove the references pointing at it.
urlString—Full Discord webhook URL.
usernameString—Username shown instead of the webhook's own. Empty = the one configured on Discord.
avatarUrlString—Avatar URL shown instead of the webhook's own. Empty = the one configured on Discord.
pingRoleIdsList<String>emptyRoles 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.

  • enabled off silences the destination without removing the references to it.
  • username and avatarUrl override the name and picture configured on Discord. Empty keeps Discord's.
  • pingRoleIds lists 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 notificationWebhookId field.