-
Notifications
You must be signed in to change notification settings - Fork 0
/
botManager.js
58 lines (36 loc) · 1.51 KB
/
botManager.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
Copyright 2017 ChickenStorm
This file is part of Chicken Bot.
Foobar is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Chicken Bot is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with Chicken Bot. If not, see <http://www.gnu.org/licenses/>.
*/
"use strict";
var mainBot = require('./mainBot/mainBot.js');
var fs = require("fs"); // file système pour lire / écire dans des fichier
var emailBot = ""; // email du bot
var passwordBot = ""; // pass du bot
var botToken="";
var loginServ; // [user,pass] for the server connection
//var loginServ; //[user,pass] du bot
fs.readFile('loginServeur.txt','ascii', function (err, data) { // lit les login pour le serveur
var dataTemp2= data.split(";");
loginServ = dataTemp2;
dataTemp2 = "";
fs.readFile('token.txt','ascii', function (err, data) { // lit les login du bot
var dataTemp= data.split(";");
var token = dataTemp[0];
//passwordBot = dataTemp[1];
data = "";
dataTemp = [];
console.log(emailBot+"-"+passwordBot);
mainBot.init(token);
});
});