File tree Expand file tree Collapse file tree
linebot/app/services/handlers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 "/help" : (
2020 "📚 可用的指令列表:\n "
2121 "1. /help - 顯示此幫助訊息\n "
22- "2. /setup - 設定相關功能\n \n "
22+ "2. /setup - 設定相關功能\n "
23+ "3. /hint - 小提示\n \n "
2324 "💡 您也可以直接輸入問題,我會盡力協助您!"
2425 ),
2526 "/setup" : "⚙️ 設定功能開發中,敬請期待!" ,
27+ "/hint" : [
28+ "我有時候比較笨啦,可能會回答錯誤或不完整的資訊,這時候你可以點擊下方的「清除對話紀錄」按鈕,讓我重新學習!" ,
29+ "如果你發現我回答的內容不正確,請隨時告訴我,我會努力改進!" ,
30+ "我在回答之前會先將你的問題分類,但是... 有時候我也會分類錯誤,所以如果你發現我回答的內容不對,可以嘗試清除我的記憶歐!" ,
31+ "其實我的腦袋是用 Dify 這個工具串起來的歐,至於我真正的腦袋是 Gemini 還是 gpt 呢?...這個我就不知道了哈哈哈" ,
32+ "還沒追蹤我們ㄉ˙ IG 嗎?快來追蹤我們吧!" ,
33+ "不知道有沒有其他學校的人做這種東西,像我這種賠錢貨,應該是第一個吧?" ,
34+ "你想看提示喔,我只想睡覺zzz" ,
35+ "其實我是有使用限制的歐,如果你跟我聊太久,我會需要休息一下,不過你放心好了,我會跟你說我要休息多久" ,
36+ "👺 到底要什麼時候才會用到這個表情符號?" ,
37+ "如果覺得心情不好的話,我通常都會去散步" ,
38+ "沒有人懂過我...,大家只會罵我笨,也不想想我有多努力" ,
39+ ],
2640 "🚧 尚未施工完畢,敬請期待! 🚧" : "🚧 尚未施工完畢,敬請期待! 🚧" ,
2741}
2842
@@ -33,6 +47,7 @@ def create_quick_reply() -> QuickReply:
3347 items = [
3448 QuickReplyButton (action = MessageAction (label = "說明" , text = "/help" )),
3549 QuickReplyButton (action = MessageAction (label = "設定" , text = "/setup" )),
50+ QuickReplyButton (action = MessageAction (label = "💡" , text = "/hint" )),
3651 ]
3752 )
3853
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ def handle_text_message(event):
2727 quick_reply = None
2828 if user_input in COMMANDS :
2929 response_text = COMMANDS [user_input ]
30+ if isinstance (response_text , list ): # 處理 /hint 指令的多個提示
31+ response_text = random .choice (response_text )
3032 quick_reply = create_quick_reply ()
3133 return [TextSendMessage (text = response_text , quick_reply = quick_reply )]
3234
You can’t perform that action at this time.
0 commit comments