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 10:56:31 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e3447622e05a6cfbc48a39c2f8639a8a3991282d
e3447622
1 parent
c45dad38
Update app.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
app.js
app.js
View file @
e344762
...
...
@@ -82,7 +82,8 @@ function handleEvent(event) {
}
else
if
(
event
.
type
==
'message'
&&
event
.
message
.
type
==
'image'
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
"!"
);
client
.
replyMessage
(
event
.
replyToken
,
event
.
message
.
image
).
then
(
resolve
).
catch
(
reject
);
/*console.log("!");
var cheerio = require('cheerio');
let subscriptionKey = process.env['COMPUTER_VISION_SUBSCRIPTION_KEY'];
...
...
@@ -105,7 +106,7 @@ function handleEvent(event) {
request.post(options, function (error, response, body) {
var data=JSON.stringify(body);
var text='';
console
.
log
(
"data:"
+
data
);
console.log(data);
while(data.indexOf('text\\')!=-1)
{
data=data.substring(data.indexOf('text\\')+9);
...
...
@@ -137,8 +138,10 @@ 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