Last active
May 30, 2022 04:05
-
-
Save PamornT/da88ce3dbc5c1cb6e8bb129078936d90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const savePointVideoComplete = async(event) => { | |
const replyToken = event.replyToken | |
let messages = '' | |
const pointExists = await checkPointExists(event) | |
if (pointExists) { | |
messages = [{ 'type': 'text', 'text': '🎉 ขอบคุณที่รับชมวีดีโอ คุณเคยได้รับคะแนนกิจกรรมนี้ไปแล้ว 🎉' }] | |
} else { | |
await collectPoint(event) | |
messages = [{ 'type': 'text', 'text': '🎉 ขอบคุณที่รับชมวีดีโอ รับคะแนนไปเลย 10 คะแนน 🎉' }] | |
} | |
await reply(replyToken, messages) | |
return true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment