Promotion background
Halloween Season IS HERE!
10% off limited time offer!
limited time offer SAVE 10% NOW →
FEATURES

🪝 Discord Webhooks

On this page, you will find how to post shop activity to Discord channels through webhooks.

circle-info

Everything on this page is set in discord.yml. It has no editor screen.

#Discord Webhooks

Phoenix Shop can post what happens in your shops to Discord: purchases, sales, price changes, stock running out, restock alerts, admin edits and a daily summary. Each kind of message has its own webhook, so each can go to a different channel or be left off. This is a Premium feature.

Messages are queued and sent in the background, so a slow or unreachable Discord never holds up a purchase.

#Setup

1

#Create the webhook

In Discord, open Server Settings > Integrations > Webhooks, create one for the channel you want the messages in, and copy its URL.

2

#Paste it into discord.yml

Find the message you want, such as purchase, put the URL into its webhook-url, and set its enabled to true.

3

#Reload and test

Run /pshop reload. /pshop webhooktest posts a test message to the anomaly webhook, so point that one at your channel to check the connection. The test needs the phoenixshop.admin permission.

#Messages

Message Posted when Shows
purchase A player buys from a shop. Player, item, amount, price, currency and shop.
sale A player sells to a shop. Player, item, amount, price, currency and shop.
large-transaction A purchase or sale costs or pays at least the threshold. The same, plus whether it was a purchase or a sale.
price-change The price audit or the price generator changes a price. Shop, item, and the old and new price.
stock-depleted An item with limited stock sells out. Shop and item.
restock An item with limited stock is restocked. Shop, item and the new stock.
restock-alert A restock alert goes out. Shop, item, whether it restocked or its sale window opened, and how many players were alerted.
player-shop-created A player builds a chest shop. Owner, item, mode, prices, currency and location.
player-shop-removed A chest shop is removed. Owner, item, mode, prices, currency and location.
admin-edit An admin changes anything in the editor. Admin, shop, category, item, what changed and the new value.
daily-summary Once a day, at the set time. See below.
anomaly /pshop webhooktest is run. Who sent the test.

The large transaction message is posted as well as the purchase or sale message, not instead of it. The restock alert message is posted even when no player was alerted.

#Options

Every message has the same options, with three extras.

discord:
  purchase:
    enabled: false
    webhook-url: ''
    username: Phoenix Shop
    avatar-url: ''
    embed:
      title: Purchase
      color: '#57f287'
  large-transaction:
    threshold: 10000
  daily-summary:
    time: '00:00'
  restock-alert:
    message:
      restocked: '%item% is back in stock in %shop%.'
      window-opened: '%item% is on sale again in %shop%.'
Option Description
enabled Whether this message is posted at all.
webhook-url The Discord webhook URL. Nothing is posted while it is empty.
username The name the webhook posts under.
avatar-url An image URL used as the webhook's avatar. Empty uses the webhook's own.
embed.title The embed's heading. Empty uses the message's default title.
embed.color The colour of the embed's side bar, as a hex value.
threshold Large transaction only. The price at which a purchase or sale counts as large, in any currency.
time Daily summary only. The time of day to post, as HH:MM on the server's clock.
message Restock alert only. The text posted when the item restocks, and when it goes on sale again. %item% and %shop% are filled in.

#Daily Summary

Posted once a day at the set time, covering the 24 hours before it: the number of purchases and sales, what players spent and were paid per currency, the most traded item, and the player who bought and the player who sold the most. Undone transactions are left out. A day with no transactions says so.

A time the plugin cannot read switches the summary off and leaves a warning in the console.

#Troubleshooting

If messages are not arriving, check the console. The plugin warns once per webhook, without printing the URL, when Discord refuses a post or cannot be reached.

  • The URL is wrong. It must be the full https://discord.com/api/webhooks/... address, not a link to the channel.
  • The webhook was deleted in Discord. The plugin keeps posting to an address that no longer exists until the URL is changed.
  • Rate limits. When Discord asks the plugin to slow down, it waits and sends the rest after. Up to 64 messages wait in the queue, and anything past that is dropped, so a very busy shop with purchase and sale messages on can lose some.
Last updated about 1 hour ago
My Cart (0 items)

Oops... looks like the spiders padded through here

Add products to your cart and remove them from here Lets buy