-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbot.js
More file actions
29 lines (25 loc) · 739 Bytes
/
bot.js
File metadata and controls
29 lines (25 loc) · 739 Bytes
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
//Requires
const TradeOffersManager = require('steam-tradeoffer-manager');
const config = require('./config.json');
const fs = require('fs');
//Initiating
const manager = new TradeOffersManager({
language :'en'
});
manager.getUserInventoryContents(config.mySteam,config.appId,config.conId,config.tradeable, (err,inventory) => {
var inventory = inventory;
var err = err;
if(err){
console.log("An error occured : " + err);
} else {
// console.log(inventory);
var invString = JSON.stringify(inventory);
fs.writeFile(config.mySteam + ".txt",invString, (err) => {
if(err){
console.log(err);
} else {
console.log("Wrote to file : " + config.mySteam+".txt")
}
});
}
});