Skip to content

Commit 21fbf6e

Browse files
authored
Update app.py
1 parent 83bbd21 commit 21fbf6e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

examples/aiohttp-echo/app.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,15 @@ async def echo(self, request):
6565
continue
6666
if not isinstance(event.message, TextMessage):
6767
continue
68+
69+
if event.message.text == "告訴我秘密":
70+
reply_text = "中國娃娃魚"
71+
else:
72+
reply_text = event.message.text
6873

6974
await self.line_bot_api.reply_message(
7075
event.reply_token,
71-
TextSendMessage(text=event.message.text)
76+
TextSendMessage(text=reply_text)
7277
)
7378

7479
return web.Response(text="OK\n")

0 commit comments

Comments
 (0)