Discord
Discord should use Slack-Compatible Webhook whose constructs typically support both text and block rich text, and can be configured as follows:
Newâ
tip
Working in process, i dont know when this version is out. follow the un-offical document.
Legacyâ
caution
This section was dropped by offical. DO NOT USE
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"
}
}
]
}
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"
}
]
}