Zum Hauptinhalt springen

Shop Notification Manifest

How a shop transaction reads once it reaches Discord.

The destination is deliberately absent from this entry: it belongs to the shop, which names it on its own definition (notificationWebhookId). This entry only says how the message looks — so one presentation can serve every shop, and each shop still posts to its own channel.

Without this entry nothing is sent, whatever the shops declare.

Requirements

The Shop extension must be installed. The two extensions stay independent: Shops publishes a ShopTransactionEvent and knows nothing about Discord, while this listener is registered only when that event class is actually present on the server.

Configuration

FieldTypeDefaultDescription
shopIdsList<String>[]Shop ids this format applies to. Empty = every shop that names a destination.
announceBuysBooleantrueAnnounce purchases
announceSellsBooleantrueAnnounce sales
minimumPriceDouble0.0Announce nothing below this amount, so bulk trading does not flood the channel
titleTemplateString"{player} {action} {amount}x {item}"Title of the embed
contentTemplateString""Optional message content sent alongside the embed
buyVerbString"bought"Wording substituted for {action} on a purchase
sellVerbString"sold"Wording substituted for {action} on a sale
colorString"#55ff55"Hex color applied to the embed sidebar
fieldsList<ShopNotificationField>Shop, PriceFields added to the embed body

Field

FieldTypeDefaultDescription
nameString"Player"Label displayed in the Discord embed field
valueString"{player}"Value shown in the field (placeholders supported)
inlineBooleantrueDisplay this field on the same line when possible

Placeholders

Available in titleTemplate, contentTemplate and every field value:

PlaceholderValue
{player}Name of the player who traded
{shop}Id of the shop
{item}Item's display name, or its material spelled out when it has none
{amount}Quantity traded
{price}Money moved, taxes and promotions included
{action}buyVerb or sellVerb

Setting it up

  1. Add a webhook_definition and paste the channel's URL into it.
  2. On the shop definition, set notificationWebhookId to that entry's id.
  3. Add one shop_notification_manifest to say how the message reads.

Several formats can coexist, but only one is applied per transaction: the first entry covering the shop and announcing that side of the trade. Which one that is follows entry order, which you do not control precisely — so keep shopIds sets disjoint rather than relying on a narrow format shadowing a catch-all one.