-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.py
More file actions
24 lines (15 loc) · 680 Bytes
/
utils.py
File metadata and controls
24 lines (15 loc) · 680 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import os
from linebot import LineBotApi, WebhookParser
from linebot.models import MessageEvent, TextMessage, TextSendMessage, ImageSendMessage
channel_access_token = os.getenv("LINE_CHANNEL_ACCESS_TOKEN", None)
def send_text_message(reply_token, text):
line_bot_api = LineBotApi(channel_access_token)
line_bot_api.reply_message(reply_token, TextSendMessage(text=text))
return "OK"
def send_image_url(reply_token, img_url):
line_bot_api = LineBotApi(channel_access_token)
line_bot_api.reply_message(reply_token, ImageSendMessage(preview_image_url= img_url, original_content_url= img_url))
""""
def send_button_message(id, text, buttons):
pass
"""