-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathremote.js
51 lines (47 loc) · 1.06 KB
/
remote.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
const fs = require('fs');
const autoRemote = require('./TF2AutoRemote');
//const remote = new autoRemote(0);
autoRemote.getAllBots()
.then((bots)=>{
console.log(bots);
});
/*
remote.getPricelist()
.then((data)=>{
fs.writeFileSync('./pre.json', JSON.stringify(data));
})
.catch((err)=>console.error(err));
remote.addItem({sku: "442;11;kt-3"})
.then(()=>{
console.log("Added")
remote.removeItem("442;11;kt-3")
.then(()=>{
console.log("ok")
remote.getPricelist()
.then((data)=>{
fs.writeFileSync('./post.json', JSON.stringify(data));
})
.catch((err)=>console.error(err));
})
.catch((err)=>console.error(err));
})
.catch((err)=>console.error(err));
*/
/*
pm2.connect(function() {
});
pm2.sendDataToProcessId({
type : 'pricelist:get',
data : {
some : 'data',
hello : true
},
id : 1, // id of procces from "pm2 list" command or from pm2.list(errback) method
topic: 'some topic'
}, function(err, res) {
});
pm2.launchBus(function(err, bus) {
bus.on('process:msg', function(packet) {
console.log(packet);
});
});*/