Discord
Overviewβ
Send notifications to a Discord channel.About Discord Notifierβ
The discord notifier allows to get notified on your favorite discord channel when an instance of go-feature-flag is
detecting changes in the configuration of your flags.

Each notification lists the flags that were created, updated or deleted. For an updated flag, every change is described as a short sentence, for example:
βοΈ Flag "dark-mode" updated
β’ Version set to `2`
β’ Targeting rule `beta-users` now matches `beta eq true or company eq "acme"` (was `beta eq true`)
β’ Targeting rule `internal` added: serves `enabled` when `email ew "@example.com"`
β’ Default rule now serves `disabled` 50%, `enabled` 50% (was `disabled` 90%, `enabled` 10%)
A flag shows at most 50 changes, and a last line counts the changes left out. Discord limits the size of a message, so when many flags change at once the longest lists are shortened first. If more than 10 flags change, the message shows the first 9 and asks you to check the logs for the rest.
Configure Discord Notificationsβ
- Connect to your discord account and go on the channel where you want to send the notifications.
- Go on the settings menu of your channel.

- Under your channelβs settings, go to the "Integrations" section and create a new webhook. To create it, please follow the official documentation.
- Copy the webhook URL

- Now you can configure your notifier
Configure the relay proxyβ
To configure your relay proxy to use the Discord notifier, you need to add the following configuration to your relay proxy configuration file:
# ...
notifier:
- kind: discord
webhookUrl: "https://discord.com/api/webhooks/yyyy/xxxxxxx"
# ...
| Field name | Mandatory | Type | Default | Description |
|---|---|---|---|---|
kind | string | none | Value should be discord.This field is mandatory and describe which retriever you are using. | |
webhookUrl | string | none | The complete URL of your incoming webhook configured in Discord. |
Configure the GO Moduleβ
To configure your GO module to use the Discord notifier, you need to add the following
configuration to your ffclient.Config{} object:
err := ffclient.Init(ffclient.Config
{
// ...
Notifiers: []notifier.Notifier{
&discordnotifier.Notifier{
DiscordWebhookURL: "https://discord.com/api/webhooks/yyyy/xxxxxxx",
},
},
})
defer ffclient.Close()
| Field | Mandatory | Description |
|---|---|---|
DiscordWebhookURL | The complete URL of your discord webhook. |