Discord messages
(4.1.1+) FlareTokens can write in a channel of your Discord server when:
- a timed sale starts (
/tokens sale) - a booster for everyone starts (
/tokens booster 2 1h) - a player buys something for at least
purchase-mintokens
Setup
- In Discord open the channel settings → Integrations → Webhooks → New Webhook → Copy Webhook URL.
- In
config.yml:
discord:
enabled: true
webhook-url: "https://discord.com/api/webhooks/123456789/abcdef..."
# Name of the sender in Discord
username: "FlareTokens"
# Color of the side line of the message
color: "#B57BFF"
# A timed sale starts
sale: true
# A booster for everyone starts
booster: true
# A shop purchase of at least ... tokens. 0 = off
purchase-min: 1000
/tokens reload.
Keep the webhook address private: whoever has it can write in that channel. FlareTokens never writes it in the console, and only accepts real Discord webhook addresses.
Texts
In lang/en.yml → discord. **bold** works, Minecraft colors are removed.
discord:
sale: "**{percent}% off** every price in the token shop for **{time}**!"
sale-shop: "**{percent}% off** in the **{shop}** shop for **{time}**!"
booster: "**{multiplier}x tokens** for everyone for **{time}**!"
purchase: "**{player}** bought **{product}** for **{price} tokens**."
Leave a text empty ("") to never send that message.
Good to know
- On a network only the server where the sale or booster was started sends the message, so it is not sent twice.
- Mentions are blocked: a product called
@everyonedoes not ping anyone. - Messages are sent in the background: if Discord is slow or down, the server does not wait.
- If the webhook was deleted, the console says so once.
Actualizat ultima data pe