Your Name 3 年 前
コミット
ed4d1fe338
1 ファイル変更6 行追加11 行削除
  1. 6 11
      step_question/apis/newbot.py

+ 6 - 11
step_question/apis/newbot.py

@@ -18,7 +18,7 @@ from linebot.models import (
     MemberJoinedEvent, MemberLeftEvent,
     FlexSendMessage, BubbleContainer, ImageComponent, BoxComponent,
     TextComponent, IconComponent, ButtonComponent, MessageTemplateAction,
-    SeparatorComponent, QuickReply, QuickReplyButton,
+    SeparatorComponent, QuickReply, QuickReplyButton,URITemplateAction,
     ImageSendMessage)
 
 #uvicorn main:app --host 0.0.0.0 --port 443 --ssl-keyfile=/etc/letsencrypt/live/cal.ptt.cx/privkey.pem --ssl-certfile=/etc/letsencrypt/live/cal.ptt.cx/fullchain.pem
@@ -67,19 +67,14 @@ async def callback(request: fastapi.Request):
 def handle_follow(event):
     print("in Follow")
     button_template_message =ButtonsTemplate(
-                                    thumbnail_image_url="https://herguang.com/assets/images/icon_home.png",
+                                    thumbnail_image_url="http://q.ptt.cx/a1/images/banner_top1.jpg",
                                     title='Menu', 
-                                    text='歡迎follow',
+                                    text='歡迎 ',
                                     image_size="cover",
                                     actions=[
-                                        MessageTemplateAction(
-                                            label='功能1', text='function-1'
-                                        ),
-                                        MessageTemplateAction(
-                                            label='功能2', text='function-2'
-                                        ),
-                                        MessageTemplateAction(
-                                            label='功能3', text='function-3'
+                                        URITemplateAction(
+                                        label='填問卷,領取五萬元折抵券',
+                                        uri='影片網址'
                                         ),
                                     ]
                                 )