kenken999 commited on
Commit
55c5b58
1 Parent(s): 0307fa7
Files changed (1) hide show
  1. routers/webhook.py +11 -10
routers/webhook.py CHANGED
@@ -152,16 +152,17 @@ async def webhook(request: Request):
152
  #return
153
  #test case
154
  #########################################################################
155
- print("start reply -----------------------------------------------"+reply_token)
156
- first_line = text.split('\n')[0]
157
- # test_prompt
158
- line_bot_api = LineBotApi(ChannelAccessToken)
159
- line_bot_api.reply_message(
160
- reply_token,
161
- TextSendMessage(text="line replay test")
162
- )
163
- print("End replay -----------------------------------------------")
164
- exit
 
165
  if not line_signature:
166
  raise HTTPException(status_code=400, detail="X-Line-Signature header is missing.")
167
 
 
152
  #return
153
  #test case
154
  #########################################################################
155
+ if message not in ["買取方法", "取扱商品","本日の金価格"]:
156
+ print("start reply -----------------------------------------------"+reply_token)
157
+ first_line = text.split('\n')[0]
158
+ # test_prompt
159
+ line_bot_api = LineBotApi(ChannelAccessToken)
160
+ line_bot_api.reply_message(
161
+ reply_token,
162
+ TextSendMessage(text="固定メッセージです クレジットは消費しません")
163
+ )
164
+ print("End replay -----------------------------------------------")
165
+ exit
166
  if not line_signature:
167
  raise HTTPException(status_code=400, detail="X-Line-Signature header is missing.")
168