discord: Send alerts and notifications to Discord

The discord() destination driver sends messages to Discord using Discord Webhook. For the list of available optional parameters, see Discord destination options.

Prerequisites

Declaration:

Terminal window
@include "scl.conf"
# ...

destination {
    discord(url("https://discord.com/api/webhooks/x/y"));
};

By default the message sending is throttled to 5 message/sec, see Discord: Rate Limits. To change this, use the throttle() option.

Example: Using the discord() driver

The following example sends messages with custom avatar, and text-to-speech enabled.

Terminal window
@include "scl.conf"
destination d_discord {
    discord(
        url("https://discord.com/api/webhooks/x/y")
        avatar-url("https://example.domain/any_image.png")
        username("$HOST-bot") # Custom bot name, accepts macros
        tts(true) # Text-to-Speech message
        template("${MSG:-[empty message]}") # Message to send, can't be empty
    );
}
Last modified October 2, 2026: Link fixes (7fdc8919)