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-06 09:28:29 +0000
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
52992f58789f40963cb01750772c78c09c8c7d1a
52992f58
2 parents
b03ecbbb
2b34cfb7
Merge remote-tracking branch 'origin/feature_private'
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
.gitignore
index.js
video_sad.js
.gitignore
View file @
52992f5
*.json
node_modules/
.vscode/
\ No newline at end of file
/index_Temp.js
/Info.js
\ No newline at end of file
...
...
index.js
View file @
52992f5
...
...
@@ -9,11 +9,10 @@ const bodyParser = require('body-parser');
var
app
=
express
();
app
.
use
(
bodyParser
.
json
());
// var { google } = require('googleapis');
var
sad
=
require
(
'./video_sad'
);
app
.
post
(
'/hook'
,
function
(
req
,
res
)
{
var
eventObj
=
req
.
body
.
events
[
0
];
...
...
video_sad.js
View file @
52992f5
var
Info
=
require
(
'./Info'
);
exports
.
check
=
function
(
message
,
replyToken
){
const
rand_0to9
=
Math
.
floor
(
Math
.
random
()
*
10
);
// 0~9까지 난수생성
...
...
@@ -6,8 +8,8 @@ exports.check = function(message,replyToken){
const
request
=
require
(
'request'
);
const
TARGET_URL
=
'https://api.line.me/v2/bot/message/reply'
//라인 고유 토큰
const
TOKEN
=
'Kb1/rQYz4MUhF8XyKQv7z9x0MxVQ5bX/XO8S/yt/1qQEJVAbsEFAaMvXKEOx9Umr7KhivfyDPfZHRRLFPngR0O4ZGWV2VFses8ufPE7uAdvYr4G6keBNAU69nBz5IC71HfbIrUHxXYqD7GfhVwXzpwdB04t89/1O/w1cDnyilFU='
var
{
google
}
=
require
(
'googleapis'
);
var
service
=
google
.
youtube
(
'v3'
);
...
...
@@ -42,7 +44,7 @@ exports.check = function(message,replyToken){
url
:
TARGET_URL
,
headers
:
{
'Authorization'
:
`Bearer
${
TOKEN
}
`
'Authorization'
:
`Bearer
${
Info
.
TOKEN
}
`
},
json
:
{
...
...
Please
register
or
login
to post a comment