Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
能使用變數的 LINE 訊息推送小工具
{
"type": "bubble",
"hero": {
"type": "image",
"url": "https://scdn.line-apps.com/n/channel_devcenter/img/fx/01_1_cafe.png",
"size": "full",
"aspectRatio": "20:13",
"aspectMode": "cover"
},
"body": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "text",
"text": "${nick_name}的擲骰結果",
"weight": "bold",
"size": "xl"
},
{
"type": "box",
"layout": "horizontal",
"contents": [
{
"type": "text",
"text": "四面骰",
"flex": 0
},
{
"type": "text",
"text": "${_.random(1,4)}",
"align": "end"
}
]
},
{
"type": "box",
"layout": "horizontal",
"contents": [
{
"type": "text",
"text": "六面骰",
"flex": 0
},
{
"type": "text",
"text": "${_.random(1,6)}",
"align": "end"
}
]
},
{
"type": "box",
"layout": "horizontal",
"contents": [
{
"type": "text",
"text": "八面骰",
"flex": 0
},
{
"type": "text",
"text": "${_.random(1,8)}",
"align": "end"
}
]
},
{
"type": "box",
"layout": "horizontal",
"contents": [
{
"type": "text",
"text": "十面骰",
"flex": 0
},
{
"type": "text",
"text": "${_.random(1,10)}",
"align": "end"
}
]
},
{
"type": "box",
"layout": "horizontal",
"contents": [
{
"type": "text",
"text": "十二面骰",
"flex": 0
},
{
"type": "text",
"text": "${_.random(1,12)}",
"align": "end"
}
]
}
],
"spacing": "md"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.