Toggle navigation
Toggle navigation
This project
Loading...
Sign in
은승우
/
LINEBOT
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
은승우
2019-12-05 12:34:14 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
73820d3d456af55f60059e4327200713adb817c8
73820d3d
1 parent
bc8d814a
Update app.js
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
app.js
app.js
View file @
73820d3
...
...
@@ -81,7 +81,7 @@ async function handleEvent(event) {
return
Promise
.
resolve
(
null
);
}
else
if
(
event
.
type
==
'message'
&&
event
.
message
.
type
==
'image'
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
console
.
log
(
"!"
);
var
cheerio
=
require
(
'cheerio'
);
...
...
@@ -102,9 +102,7 @@ async function handleEvent(event) {
},
body
:
event
.
message
.
image
};
}).
resolve
((
options
)
=>
{
request
.
post
(
options
,
function
(
error
,
response
,
body
)
{
await
request
.
post
(
options
,
function
(
error
,
response
,
body
)
{
var
data
=
JSON
.
stringify
(
body
);
var
text
=
''
;
console
.
log
(
data
);
...
...
@@ -139,7 +137,7 @@ async function handleEvent(event) {
}
client
.
replyMessage
(
event
.
replyToken
,
result
).
then
(
resolve
).
catch
(
reject
);
});
})
})
;
})
}
else
if
(
event
.
type
==
'message'
&&
event
.
message
.
type
==
'text'
)
...
...
Please
register
or
login
to post a comment