김대연

delete unused js file, add env example explain

1 -SOCKET_PORT= 1 +
2 -TWITCH_TOKEN= 2 +HOST_URI = [twitch end point url]
3 -PAPAGO_ID= 3 +SOCKET_PORT= [backend socket server port]
4 -PAPAGO_SECRET= 4 +TWITCH_CLIENT= [twitch dev client id]
5 -BOT_USERNAME= 5 +TWITCH_SECRET= [twitch dev client id secret]
6 -OAUTH_TOKEN= 6 +PAPAGO_ID= [papago client id]
7 +PAPAGO_SECRET= [papago client secret]
8 +BOT_USERNAME= [twitch bot name]
9 +OAUTH_TOKEN= [twitch user oauth token]
......
1 -// const tmi = require('tmi.js');
2 -// const papago = require('./openAPIs/papago_api')
3 -// const ttlserver = require('../socket_server')
4 -
5 -// // Define configuration options
6 -// var opts = {
7 -// identity: {
8 -// username: process.env.BOT_USERNAME,
9 -// password: process.env.OAUTH_TOKEN
10 -// },
11 -// channels: [
12 -// 'bachelorchuckchuck'
13 -// ]
14 -// };
15 -
16 -// // Create a client with our options
17 -// const client = new tmi.client(opts);
18 -
19 -// // Register our event handlers (defined below)
20 -// client.on('message', onMessageHandler);
21 -// client.on('connected', onConnectedHandler);
22 -
23 -// // Connect to Twitch:
24 -// client.connect();
25 -
26 -// // Called every time a message comes in
27 -// function onMessageHandler (target, context, msg, self) {
28 -// if (self) { return; } // Ignore messages from the bot
29 -
30 -// client.say(target, `/color `+changecolor());
31 -// papago.detectchat(msg, client, target);
32 -
33 -// if(msg == '척척학사'){
34 -// client.say(target, `안녕하세요 척척학사의 방송입니다.`);
35 -// }
36 -
37 -// }
38 -
39 -// exports.addChannel = (channel) =>{
40 -// opts.channels.append(channel);
41 -// }
42 -
43 -// // Called every time the bot connects to Twitch chat
44 -// function onConnectedHandler (addr, port) {
45 -// console.log(`* Connected to ${addr}:${port}`);
46 -// }