github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/outputs/discord.md (about) 1 --- 2 title: discord 3 type: output 4 status: experimental 5 categories: ["Services","Social"] 6 --- 7 8 <!-- 9 THIS FILE IS AUTOGENERATED! 10 11 To make changes please edit the contents of: 12 lib/output/discord.go 13 --> 14 15 import Tabs from '@theme/Tabs'; 16 import TabItem from '@theme/TabItem'; 17 18 :::caution EXPERIMENTAL 19 This component is experimental and therefore subject to change or removal outside of major version releases. 20 ::: 21 Writes messages to a Discord channel. 22 23 24 <Tabs defaultValue="common" values={[ 25 { label: 'Common', value: 'common', }, 26 { label: 'Advanced', value: 'advanced', }, 27 ]}> 28 29 <TabItem value="common"> 30 31 ```yaml 32 # Common config fields, showing default values 33 output: 34 label: "" 35 discord: 36 channel_id: "" 37 bot_token: "" 38 ``` 39 40 </TabItem> 41 <TabItem value="advanced"> 42 43 ```yaml 44 # All config fields, showing default values 45 output: 46 label: "" 47 discord: 48 channel_id: "" 49 bot_token: "" 50 rate_limit: "" 51 ``` 52 53 </TabItem> 54 </Tabs> 55 56 This output POSTs messages to the `/channels/{channel_id}/messages` Discord API endpoint authenticated as a bot using token based authentication. 57 58 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. 59 60 61 ## Fields 62 63 ### `channel_id` 64 65 A discord channel ID to write messages to. 66 67 68 Type: `string` 69 70 ### `bot_token` 71 72 A bot token used for authentication. 73 74 75 Type: `string` 76 77 ### `rate_limit` 78 79 An optional rate limit resource to restrict API requests with. 80 81 82 Type: `string` 83 Default: `""` 84 85