Skip to main content
Version: v1.40.0

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.

Discord Notification

Configure Discord Notifications​

  1. Connect to your discord account and go on the channel where you want to send the notifications.
  2. Go on the settings menu of your channel.

Discord Config

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

Discord WebHook

  1. 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:

goff-proxy.yaml
# ...
notifier:
- kind: discord
webhookUrl: "https://discord.com/api/webhooks/yyyy/xxxxxxx"
# ...
Field nameMandatoryTypeDefaultDescription
kindstringnoneValue should be discord.
This field is mandatory and describe which retriever you are using.
webhookUrlstringnoneThe 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:

example.go
err := ffclient.Init(ffclient.Config
{
// ...
Notifiers: []notifier.Notifier{
&discordnotifier.Notifier{
DiscordWebhookURL: "https://discord.com/api/webhooks/yyyy/xxxxxxx",
},
},
})
defer ffclient.Close()
FieldMandatoryDescription
DiscordWebhookURLThe complete URL of your discord webhook.