Toggle navigation
Toggle navigation
This project
Loading...
Sign in
백승욱
/
movie-reco-chatbot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
백승욱
2022-06-06 20:37:45 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f301e0107bac24759fd25fa667afbc075b3ddd95
f301e010
1 parent
23a5ddae
Add some reply message functions
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
0 deletions
Exception.js
Exception.js
View file @
f301e01
//=============================================================
var
express
=
require
(
'express'
);
const
request
=
require
(
'request'
);
const
config
=
require
(
'../config.json'
);
//=============================================================
const
LINE_URL
=
'https://api.line.me/v2/bot/message'
;
const
TOKEN
=
config
.
TOKEN
;
//=============================================================
exports
.
SayIDontKnow
=
function
(
replyToken
)
{
request
.
post
(
{
url
:
LINE_URL
+
'/reply'
,
headers
:
{
'Authorization'
:
`Bearer
${
TOKEN
}
`
},
json
:
{
"replyToken"
:
replyToken
,
"messages"
:
[
{
"type"
:
"text"
,
"text"
:
"이해하지 못했습니다."
}
]
}
},
(
error
,
response
,
body
)
=>
{
console
.
log
(
body
)
});
}
exports
.
test_1
=
function
(
replyToken
)
{
request
.
post
(
{
url
:
LINE_URL
+
'/reply'
,
headers
:
{
'Authorization'
:
`Bearer
${
TOKEN
}
`
},
json
:
{
"replyToken"
:
replyToken
,
"messages"
:
[
{
"type"
:
"text"
,
"text"
:
"영화 장르를 선택해주세요."
}
]
}
},
(
error
,
response
,
body
)
=>
{
console
.
log
(
body
)
});
}
exports
.
test_2
=
function
(
replyToken
)
{
request
.
post
(
{
url
:
LINE_URL
+
'/reply'
,
headers
:
{
'Authorization'
:
`Bearer
${
TOKEN
}
`
},
json
:
{
"replyToken"
:
replyToken
,
"messages"
:
[
{
"type"
:
"text"
,
"text"
:
"검색할 단어를 입력해주세요."
}
]
}
},
(
error
,
response
,
body
)
=>
{
console
.
log
(
body
)
});
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment