Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- flex = {
- "type": "bubble",
- "body": {
- "type": "box",
- "layout": "vertical",
- "contents": [
- {
- "type": "text",
- "text": "您確定要登出麥當勞嗎,登出後將不會自動抽",
- "weight": "bold",
- "style": "normal",
- "decoration": "none",
- "wrap": True,
- "size": "xl"
- }
- # , {
- # "type": "text",
- # "text": "目前不開放登入,登出後即無法再次登入!",
- # "color": "#FF0000",
- # "size": "sm",
- # "wrap": True
- # }
- ]
- },
- "footer": {
- "type": "box",
- "layout": "vertical",
- "spacing": "md",
- "contents": [
- ],
- "flex": 0
- }
- }
- for index, token in enumerate(token_list):
- mcd_name = mcd_name_list[index]
- flex['footer']['contents'].append(
- {
- "type": "button",
- "style": "primary",
- "color": "#fac209",
- "height": "sm",
- "action": {
- "type": "message",
- "label": f"登出 {mcd_name}",
- "text": f"/logout {token}"
- }
- }
- )
- flex['footer']['contents'].append(
- {
- "type": "button",
- "style": "secondary",
- "height": "sm",
- "action": {
- "type": "message",
- "label": "取消",
- "text": "取消"
- }
- }
- )
- # message=TextSendMessage(
- # text='您確定要登出麥當勞嗎,登出後將不會自動抽', quick_reply=quick_reply2)
- line_bot_api.reply_message(event.reply_token, FlexSendMessage(
- alt_text='登出麥當勞', contents=flex, quick_reply=quick_reply))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement