Toggle navigation
Toggle navigation
This project
Loading...
Sign in
신지원
/
LineMusicChatbot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
엄성진
2021-06-07 19:54:29 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
415e2615035f3d69855fbdf7a7fdc11056aa71c9
415e2615
1 parent
e2ac2423
Fix Random Recommend, Fix User Setting(part)
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
check.js
index.js
check.js
View file @
415e261
This diff is collapsed. Click to expand it.
index.js
View file @
415e261
...
...
@@ -20,11 +20,33 @@ app.post('/hook', function (req, res) {
// request log
console
.
log
(
'======================'
,
new
Date
(),
'======================'
);
send
(
eventObj
.
replyToken
,
message
.
text
,
eventObj
.
source
.
userId
);
console
.
log
(
eventObj
);
if
(
eventObj
.
type
==
"message"
)
// 일반 메시지일때
react
(
eventObj
.
replyToken
,
message
.
text
,
eventObj
.
source
.
userId
);
else
if
(
eventObj
.
postback
.
data
==
"썸네일"
)
//설정에서 썸네일 설정버튼을 눌렀을때
songs
.
thumbnail_settings
(
eventObj
.
replyToken
,
eventObj
.
source
.
userId
);
//else if (썸네일 설정 버튼을 누르고 거기서 응답이 들어왔을때)
else
if
(
eeventObj
.
postback
.
data
==
"개수"
)
//설정에서 출력 개수 설정버튼을 눌렀을때
songs
.
amount_settings
(
eventObj
.
replyToken
,
eventObj
.
source
.
userId
);
//else if (출력 개수 설정 버튼을 누르고 거기서 응답이 들어왔을때)
else
if
(
eventObj
.
postback
.
data
==
"주소"
)
//설정에서 유튜브 주소 설정버튼을 눌렀을때
songs
.
address_settings
(
eventObj
.
replyToken
,
eventObj
.
source
.
userId
);
//else if (유튜브 주소 설정 버튼을 누르고 거기서 응답이 들어왔을때)
//★★else if (플레이리스트를 입력했을때 뜬 버튼에서 장르를 눌렀을때)
//★★else if (플레이리스트를 입력했을때 뜬 버튼에서 무드를 눌렀을때)
//★★else if (플레이리스트를 입력했을때 뜬 버튼에서 가수를 눌렀을때)
res
.
sendStatus
(
200
);
});
function
send
(
replyToken
,
message
,
userId
)
{
function
react
(
replyToken
,
message
,
userId
)
{
request
.
post
(
{
...
...
Please
register
or
login
to post a comment