Discord Webhooks

Send messages from the game to your Discord server.

Discord Webhooks lets the helper post messages to a channel on your Discord server: saved texts with one click and – together with Guild Battlegrounds – sector announcements with their opening time, manually or automatically. If you want to send the sector data to your own server instead, use Web Requests.

The Discord Webhooks window with saved messages and templates
The Discord Webhooks window with saved messages and templates

Opening

  • Menu bar: Discord Webhooks icon (see menu bar).
  • In the Guild Battlegrounds window under the gear → Sending tab: as long as no webhook URL is saved, it shows “No Webhooks available. Create one first” with an Open button.

The window never opens by itself.

Creating a webhook in Discord

A webhook is an address that lets programs post into exactly one Discord channel. You create it in Discord in the channel settings under Integrations (you need the permission to manage webhooks on that server) and copy its URL. For several channels, create one webhook per channel.

Managing webhook URLs

At the top of the window, click Manage Webhook URLs to expand or collapse it. If no URL is saved yet, the section is already open.

The expanded Manage Webhook URLs section with fields for name, URL and thread ID
The expanded Manage Webhook URLs section with fields for name, URL and thread ID
Field Meaning
Name Display name of the URL. You pick the URL by this name for messages and in Guild Battlegrounds – the channel name is a good choice.
Webhook-URL The address copied from Discord. Without a URL, saving does nothing.
Thread ID (optional) With a thread ID the message is posted into a thread or forum post of the webhook's channel. Get the ID via the Discord developer mode: right-click the thread → “Copy ID”. It may only contain digits, otherwise you get “The thread ID may only contain digits!”.

Save adds the URL. A thread ID is appended to the URL as thread_id=…, so it applies wherever this URL is used. Saved URLs are listed with name and address; Delete removes a URL immediately, without confirmation.

An open Guild Battlegrounds settings pane picks up new or deleted URLs right away.

Messages

Message opens the form for a free text:

  • Webhook URL – click a name to choose the target. If there is only one URL, it is already selected; if there is none, it says “Add a webhook URL first!”.
  • Message – the text. Discord formatting (bold, italics, emoji with :name:, timestamps) is passed on exactly as you write it.
  • Cancel closes the form, Send posts the text immediately (without saving it), Save adds it to the list.

The Discord Messages list shows all saved texts. Each entry has:

Button Effect
Send Posts the saved text to its webhook URL.
Copy icon (Copy) Adds a copy of the entry at the end of the list.
Edit Opens the entry in the form.
Trash can Deletes the entry immediately, without confirmation.

Every message shows up in Discord with the sender “FoE Helper” and the helper icon. The helper adds a small line with your player name below it.

Templates

Template opens the form for a named message template for Guild Battlegrounds:

  • Name – you pick the template by this name in the Guild Battlegrounds settings.
  • Message – the text with placeholders. Prefilled with :robot: #battletype **#name** <t:#time:R>.
  • Below the field you find the available placeholders and a link to Discord text formatting.
  • Cancel / Save.
The form for a new template with the list of placeholders
The form for a new template with the list of placeholders

Templates have no webhook URL of their own and no Send button – they are only sent from Guild Battlegrounds. In the list they show their name in bold before the text and have the same Copy, Edit and trash can buttons as messages.

Placeholders

When sending, the helper replaces these placeholders with the sector's data:

Placeholder Value
#name Name of the sector
#battletype 🔴 for the attack battle type, otherwise 🔵
#time Opening time as a Unix timestamp (seconds). For Discord time tags: <t:#time:t> shows the time, <t:#time:R> the remaining time – both in the reader's time zone.
#attrition Attrition chance of the sector as a number (without %)
#guild Guild that owns the sector
#vp Victory points of the sector, a bonus in brackets, e.g. 96 (+4)
#neighbors Adjacent guilds, comma-separated – without your own guild and without the owner
#player Your player name
#world Your world, e.g. en12

The same placeholders are available in Web Requests.

Using it in Guild Battlegrounds

In the Guild Battlegrounds window, open the gear (see window buttons) and switch to the Sending tab. In the Discord Webhooks section you set:

Setting Meaning
Webhook selection The webhook URL that receives all announcements (Please choose = off).
Template for single sectors Appears as soon as at least one template exists. The empty entry is called Template and means: no template.
Template for multiple provinces Template for sending several selected sectors. Each sector becomes one line.
Send sectors automatically See Sending automatically.
Lead time (seconds) How long before the opening the automatic announcement is sent.
Skip at attrition chance of (%) Limit for automatic sending.

Save applies the selection. After that, the live overview shows these buttons in the list of upcoming sectors for every sector that doesn't belong to your guild:

  • Send to Discord – sends the standard announcement: battle type color (only if Attack colors is on under Copying in the GBG gear), sector name in bold, time and remaining time until the opening.
  • Send to Discord with template – only if a template for single sectors is selected; sends the sector using that template.

Click rows to select them. Above the list you then get Send selected provinces to Discord and – if a template for multiple provinces is selected – Send selected provinces to Discord with selected template. Both send all selected sectors as one message, one line per sector, sorted by opening time.

Sending automatically

With Send sectors automatically turned on, the helper announces every enemy sector adjacent to your guild that is still locked, once, to the selected webhook – the configured lead time before it opens.

  • Lead time (seconds): 5 to 3600, default 60.
  • Skip at attrition chance of (%): 20 to 100, default 100. If the sector's attrition chance is at or above this value at the time of sending, the announcement is skipped. If it drops afterwards and another map update arrives before the opening, the sector is announced then.
  • If a template for single sectors is selected, it is used; otherwise the standard announcement.
  • Each sector is announced only once per lock period.
  • The schedule is rebuilt every time the Guild Battlegrounds window is rebuilt. Keep the window open: if you close it, announcements already scheduled are not sent either.

Settings

The window has no gear of its own. Which webhook URL and templates Guild Battlegrounds uses and whether sectors are sent automatically is set in the Guild Battlegrounds settings (see above).

FAQ

The success message appeared, but nothing arrived in Discord. The helper doesn't check Discord's response; the message always appears. Check the webhook URL and thread ID – and whether the webhook still exists in Discord.

The Discord buttons are missing in Guild Battlegrounds. The buttons only appear once a webhook URL is selected and saved in the Sending tab, and only for sectors that don't belong to your guild. Send to Discord with template only exists if the selected template still exists under that name.

I want to post to different channels. Create one webhook per channel and save each URL under its own name. For messages you choose the target per entry; Guild Battlegrounds sends to exactly one URL.

See also