discord¶
🗣 EXPERIMENTAL This component is experimental and, therefore, subject to change or removal outside of major version releases.
Consumes messages posted in a Discord channel.
YAML Configurations¶
Common Config¶
# Common config fields, showing default values
input:
label: ""
discord:
channel_id: ""
bot_token: ""
poll_period: 1m
limit: 100
cache: ""
Advanced Config¶
# All config fields, showing default values
input:
label: ""
discord:
channel_id: ""
bot_token: ""
poll_period: 1m
limit: 100
cache: ""
cache_key: last_message_id
rate_limit: ""
This input works by polling the /channels/{channel_id}/messages
 Discord API endpoint authenticated as a bot using token-based authentication. The ID of the newest message consumed is stored in a cache in order to paginate results; ideally, this cache should be persisted across restarts in order for the service to resume where it left off.
Fields¶
channel_id
¶
A discord channel ID to consume messages from.
Type:Â string
bot_token
¶
A bot token used for authentication.
Type:Â string
poll_period
¶
The length of time (as a duration string) to wait between each poll for new messages. This field can be set empty, in which case requests are made at the limit set by the rate limit. This field also supports cron expressions.
Type:Â string
Default:Â "1m"
limit
¶
The maximum number of messages to receive in a single request.
Type:Â int
Default:Â 100
cache
¶
A cache resource to use for request pagination, the ID of the last message received will be stored in this cache and used for subsequent requests.
Type:Â string
cache_key
¶
The key identifier used when storing the ID of the last message received.
Type:Â string
Default:Â "last_message_id"
rate_limit
¶
An optional rate limit resource to restrict API requests with.
Type:Â string
Default:Â ""