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-04 02:55:18 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2b34cfb7e38c5236888f5aa945d9d52596429cec
2b34cfb7
1 parent
62caea85
Revise file details
Show 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 @
2b34cfb
*.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 @
2b34cfb
...
...
@@ -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 @
2b34cfb
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