DUXPLIMA Documentation

Discord notifications

Posting build and player market events to a Discord webhook.

uxmBuilders can post a line to a Discord channel, or any service that accepts Discord's webhook format, when a build starts, finishes or is cancelled, and when the player market lists, sells, reports or removes a design. The settings and the texts are in webhooks.yml.

Setting it up

  1. In Discord: channel settings, Integrations, Webhooks, New Webhook, copy its URL.
  2. In plugins/uxmBuilders/webhooks.yml:
enabled: true
url: 'https://discord.com/api/webhooks/...'
username: 'uxmBuilders'
events: [ START, COMPLETE, CANCEL, LISTED, SOLD, REPORTED, REMOVED ]
moderationUrl: ''
  1. /builders admin reload.

Events

EventPosted whenText
STARTA build has really started: money taken and job queuedbuildStarted
COMPLETEThe last block is placedbuildCompleted
CANCELA build is cancelled, for any reasonbuildCancelled
LISTEDA design is put on salemarketListed
SOLDA copy of a design is boughtmarketSold
REPORTEDA player reports a listing; to moderationUrl when one is setmarketReported
REMOVEDA moderator takes a listing downmarketRemoved

Builds started by staff with /builders admin build are posted too. Point moderationUrl at a staff-only channel to keep reports, and who made them, out of the players' channel. The texts are in your language, with colour tags stripped; Discord markdown and emoji codes work:

buildCompleted: ':white_check_mark: %player.name% finished **%package.name%** (#%job.id%)'

Every placeholder is listed on the webhooks.yml page.

Notes

  • Posts go out one at a time on a background thread; a slow or unreachable webhook never touches the main thread or a build.
  • A rate limit from Discord is waited out for as long as Discord asks, up to an hour, and the posts are kept meanwhile; a wait longer than a minute is warned about once. A backlog of more than 100 posts is dropped, with one warning, rather than held in memory.
  • Posts still queued when the server stops get up to three seconds to go out.
  • Mentions are disabled: a player who names a package @everyone pings nobody.
  • An empty or invalid URL logs one warning and posts nothing.

Related: webhooks.yml, Messages and menus