Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * node-steam-user
- * https://github.com/DoctorMcKay/node-steam-user
- * npm install --save steam-user
- */
- const steamUser = require('steam-user');
- /**
- * 2FA Code SteamTotp
- * https://github.com/DoctorMcKay/node-steam-totp
- * npm install --save steam-totp
- */
- var SteamTotp = require('steam-totp');
- var code2fa = SteamTotp.generateAuthCode(config.STEAM_ACCOUNT.secret2fa);
- /**
- * node-globaloffensive
- * https://github.com/DoctorMcKay/node-globaloffensive
- * npm install --save globaloffensive
- */
- const globalOffensive = require('globaloffensive');
- /**
- * node-steam-user
- * node-globaloffensive
- * Steam und CSGO Client erzuegen und Login Optionen
- */
- const steamclient = new steamUser();
- const csgoclient = new globalOffensive(steamclient);
- const logOnOptions = {
- accountName: config.STEAM_ACCOUNT.name,
- password: config.STEAM_ACCOUNT.password,
- twoFactorCode: code2fa
- /**
- * node-steam-user
- * Login + Name setzen und auf CSGO GameID 730 starten
- */
- steamclient.logOn(logOnOptions);
- steamclient.on('loggedOn', function() {
- util.log('[STEAM] -> Logged into Steam with:', logOnOptions.accountName + 'SteamID:', steamclient.steamID.getSteam3RenderedID());
- steamclient.setPersona(steamUser.EPersonaState.Online);
- steamclient.setPersona(steamUser.Steam.EPersonaState.Online, config.BOT_CONFIG.botname);
- steamclient.gamesPlayed(config.BOT_CONFIG.botgameid);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement