Jinsu Park

Update: README.md 오타 커맨드 수정, Add: npm start

...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
25 25
26 ```bash 26 ```bash
27 $cd server 27 $cd server
28 - $npm install pkg.json --save 28 + $npm install
29 $npm start 29 $npm start
30 ``` 30 ```
31 31
......
1 -// const tmi = require('tmi.js'); 1 +const tmi = require('tmi.js');
2 -// const papago = require('./openAPIs/papago_api') 2 +const papago = require('./openAPIs/papago_api')
3 -// const ttlserver = require('../socket_server') 3 +const ttlserver = require('../socket_server')
4 - 4 +
5 -// // Define configuration options 5 +// Define configuration options
6 -// var opts = { 6 +var opts = {
7 -// identity: { 7 + identity: {
8 -// username: process.env.BOT_USERNAME, 8 + username: process.env.BOT_USERNAME,
9 -// password: process.env.OAUTH_TOKEN 9 + password: process.env.OAUTH_TOKEN
10 -// }, 10 + },
11 -// channels: [ 11 + channels: [
12 -// 'bachelorchuckchuck' 12 + 'bachelorchuckchuck'
13 -// ] 13 + ]
14 -// }; 14 +};
15 - 15 +
16 -// // Create a client with our options 16 +// Create a client with our options
17 -// const client = new tmi.client(opts); 17 +const client = new tmi.client(opts);
18 - 18 +
19 -// // Register our event handlers (defined below) 19 +// Register our event handlers (defined below)
20 -// client.on('message', onMessageHandler); 20 +client.on('message', onMessageHandler);
21 -// client.on('connected', onConnectedHandler); 21 +client.on('connected', onConnectedHandler);
22 - 22 +
23 -// // Connect to Twitch: 23 +// Connect to Twitch:
24 -// client.connect(); 24 +client.connect();
25 - 25 +
26 -// // Called every time a message comes in 26 +// Called every time a message comes in
27 -// function onMessageHandler (target, context, msg, self) { 27 +function onMessageHandler (target, context, msg, self) {
28 -// if (self) { return; } // Ignore messages from the bot 28 + if (self) { return; } // Ignore messages from the bot
29 29
30 -// client.say(target, `/color `+changecolor()); 30 + client.say(target, `/color `+changecolor());
31 -// papago.detectchat(msg, client, target); 31 + papago.detectchat(msg, client, target);
32 32
33 -// if(msg == '척척학사'){ 33 + if(msg == '척척학사'){
34 -// client.say(target, `안녕하세요 척척학사의 방송입니다.`); 34 + client.say(target, `안녕하세요 척척학사의 방송입니다.`);
35 -// } 35 + }
36 36
37 -// } 37 +}
38 38
39 -// exports.addChannel = (channel) =>{ 39 +exports.addChannel = (channel) =>{
40 -// opts.channels.append(channel); 40 + opts.channels.append(channel);
41 -// } 41 +}
42 42
43 -// // Called every time the bot connects to Twitch chat 43 +// Called every time the bot connects to Twitch chat
44 -// function onConnectedHandler (addr, port) { 44 +function onConnectedHandler (addr, port) {
45 -// console.log(`* Connected to ${addr}:${port}`); 45 + console.log(`* Connected to ${addr}:${port}`);
46 -// } 46 +}
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
4 "description": "twitch translator chatbot & tts server dev", 4 "description": "twitch translator chatbot & tts server dev",
5 "main": "socket_server.js", 5 "main": "socket_server.js",
6 "scripts": { 6 "scripts": {
7 + "start": "node socket_server.js",
7 "test": "echo \"Error: no test specified\" && exit 1" 8 "test": "echo \"Error: no test specified\" && exit 1"
8 }, 9 },
9 "author": "Daeyeonkim97", 10 "author": "Daeyeonkim97",
......