# Discord

Writes messages to a Discord channel.

This output POSTs messages to the `/channels/\{channel_id}/messages` Discord API endpoint authenticated as a bot using token based authentication.

If the format of a message is a JSON object matching the [Discord API message type](https://discord.com/developers/docs/resources/channel#message-object) then it is sent directly, otherwise an object matching the API type is created with the content of the message added as a string.

## Configuration

| Name       | Type   | Optional | Secret | Description                                |
| ---------- | ------ | -------- | ------ | ------------------------------------------ |
| channel_id | string | no       | no     | A discord channel ID to write messages to. |
| bot_token  | string | no       | no     | A bot token used for authentication.       |
