discord.yml¶
The server's announcements, posted to Discord through webhooks: an event started or won, SOTW and EOTW, a bounty placed or collected, a team going raidable. The same text as in the game, colours removed. Nothing is sent until you switch it on and give a webhook URL.
How it plays: read the guide
Every example on this page is taken from the shipped discord.yml. Changes apply with /hcf reload.
enabled: false
# Webhooks, each under a name of your choosing - one per channel you post to.
webhooks:
announcements: ""
# The name and picture the posts appear under. Empty: the webhook's own.
username: "HCF"
avatar-url: ""
# text: plain messages. embed: each in a box, coloured by its rule's "color".
style: text
# What Discord hears besides the announcements - each switch sends its own
# messages (lang/en.yml, discord.*), routed by the rules below like any other:
# raids - a team going raidable, or protected again
# teams - a team founded or disbanded
# alliances - an alliance made or broken
# kills - every player killed by another (busy)
# joins - a player joining or leaving the server (busy)
# server - the server up, and stopping
sensors:
raids: true
teams: true
alliances: true
kills: false
joins: false
server: true
# Which announcements go where. "keys" is a key of lang/en.yml, where * stands for
# anything: "events.*" is every event announcement. The FIRST rule that matches
# decides; "to" is a webhook above, or "" to send the announcement nowhere - which
# is how the chatty ones are kept out before a rule that takes all the rest.
#
# A rule may also ping ("mention": a role <@&id> or a member <@id> - nothing else
# ever pings) and colour its embeds ("color": "#ffaa00"). For instance, a role
# pinged when an event starts, before the catch-all "events.*":
# - {keys: "events.*.started", to: announcements, mention: "<@&123456789012345678>", color: "#ffaa00"}
# And the kills in a channel of their own, with a second webhook "kills":
# - {keys: "discord.kill", to: kills, color: "#aa0000"}
forward:
# Too chatty for a channel: progress lines, countdown marks, every capture of a
# Conquest zone and every block of a Totem, the "starts in N minutes" marks.
- {keys: "events.*.milestone*", to: ""}
- {keys: "events.broadcast.progress", to: ""}
- {keys: "events.broadcast.contested", to: ""}
- {keys: "events.broadcast.capture-began", to: ""}
- {keys: "events.broadcast.control-lost", to: ""}
- {keys: "events.conquest.zone-captured", to: ""}
- {keys: "events.totem.broken", to: ""}
- {keys: "events.totem.reset", to: ""}
- {keys: "events.king.progress", to: ""}
- {keys: "events.king.coordinates", to: ""}
- {keys: "events.planning.soon", to: ""}
# Every event starting, won, expiring or stopped.
- {keys: "events.*", to: announcements}
# SOTW, EOTW, the Purge.
- {keys: "phase.*", to: announcements}
# A bounty placed or collected.
- {keys: "economy.bounty.*", to: announcements}
# What the sensors above hear: raids, teams, alliances, the server...
- {keys: "discord.*", to: announcements}
| Key | As shipped | What it does |
|---|---|---|
enabled |
false |
Anything sent at all |
webhooks |
announcements: "" |
Webhook URLs, each under a name of your choosing — one per channel. A URL that is not https:// is ignored with a warning |
username · avatar-url |
HCF · empty |
The name and picture the posts appear under; empty for the webhook's own |
style |
text |
text: plain messages; embed: each in a box, coloured by its rule's color |
sensors.<name> |
raids, teams, alliances, server on; kills, joins off | What Discord hears besides the announcements, each with its own messages (discord.* in the language file): raids (a team raidable or protected again), teams (founded, disbanded), alliances (made, broken), kills (every player killed by another), joins (joining, leaving), server (up, stopping) |
forward |
events, phases, bounties, sensors | The routing rules, in order: keys is a key of the language file, * standing for anything; the first rule that matches decides; to is a webhook's name, or "" to send nowhere. A rule may add mention — a role <@&id> or a member <@id> pinged with it — and color, "#ffaa00", for its embeds |
Rules are read top to bottom. That is how the shipped file keeps the chatty announcements out — progress lines, countdown marks, every capture of a Conquest zone, every block of a Totem — before events.* takes all the rest. To post one of them, delete its line; to stop a kind of post, point its rule at "".
Nobody is pinged but a rule's own mention: @everyone in a team's name stays text. A role pinged when an event starts, before the catch-all, with the kills in a channel of their own:
yaml
forward:
- {keys: "events.*.started", to: announcements, mention: "<@&123456789012345678>", color: "#ffaa00"}
- {keys: "discord.kill", to: kills, color: "#aa0000"} Posts go one at a time on a thread of their own; a rate limit from Discord is waited out once, then the post is dropped, and at most 100 wait — an outage never piles up in the server's memory.