Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // var BotManager = require('../lib/index');
- var BotManager = require('node-steam-bot-manager');
- var botsManager = new BotManager();
- var dota2 = require('dota2');
- function Doat2Bot() {
- botsManager.on('loggedInNodeSteam', function (botAccount) {
- console.log(botAccount.client.client)
- let Dota2 = new dota2.Dota2Client(botAccount.client.client, true, true);
- Dota2.launch();
- Dota2.on('ready', function () {
- Dota2.requestPlayerStats('76561198031586540', function (err, response) {
- console.log(err, response);
- })
- });
- });
- botsManager.on('loadedAccount', function (username, password, account) {
- account.initUser(function (err) {
- account.Auth.loginAccount(function (err) {
- if (err){
- setTimeout(function () {
- self.loginAccount(account);
- }, 1000 * 10);
- }
- });
- });
- });
- botsManager.startManager(function (err) {
- });
- }
- new Doat2Bot();
- module.exports = Doat2Bot;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement