Skip to main content
Version: 5.2.0

Discord

Discord should use Slack-Compatible Webhook whose constructs typically support both text and block rich text, and can be configured as follows:

Text format​

{
"text": "##{@title}\nPlatform: #{@device_type}\nUpload at: #{@uploaded_at}"
}

Block rich text format​

A simple block with markdown support

{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "## #{@title}\nPlatform: #{@device_type}\nUpload at: #{@uploaded_at}\nInstal QRcode:\n![qrcode](#{@qrcode_url})"
}
}
]
}

Better look at some of the structures shown in the block

{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": @title,
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Platform:*\n#{@device_type}"
},
{
"type": "mrkdwn",
"text": "*Upload at:*\n#{@uploaded_at}"
}
]
},
"accessory": {
"type": "image",
"image_url": @qrcode_url,
"alt_text": "install qrcode"
}
]
}