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 19:49:13 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6e5af3d95399efa4ae31c0d782b6f8be389a4d21
6e5af3d9
1 parent
97e4823e
Update app.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
app.js
app.js
View file @
6e5af3d
...
...
@@ -105,8 +105,8 @@ async function handleEvent(event) {
text
=
''
;
while
(
jsonResponse
.
indexOf
(
'text'
)
!=-
1
)
{
jsonResponse
=
jsonResponse
.
substring
(
jsonResponse
.
indexOf
(
'text'
)
+
6
);
text
+=
jsonResponse
.
substring
(
0
,
jsonResponse
.
indexOf
(
"}"
))
+
" "
;
jsonResponse
=
jsonResponse
.
substring
(
jsonResponse
.
indexOf
(
'text'
)
+
7
);
text
+=
jsonResponse
.
substring
(
0
,
jsonResponse
.
indexOf
(
"}"
)
-
1
)
+
" "
;
}
console
.
log
(
"text:"
+
text
);
...
...
@@ -131,6 +131,7 @@ async function handleEvent(event) {
if
(
songList
[
i
].
singer
!=
''
){
result
+=
songList
[
i
].
singer
+
", "
+
songList
[
i
].
song
+
"\n"
;
}
console
.
log
(
result
);
}
client
.
replyMessage
(
event
.
replyToken
,
result
).
then
(
resolve
).
catch
(
reject
);
});
...
...
Please
register
or
login
to post a comment