Advertisement
BigRedDoge

Untitled

Jul 24th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. var Steam = require('steam');
  2. var SteamCommunity = require('steamcommunity');
  3. var SteamTotp = require('steam-totp');
  4. var SteamUser = require('steam-user');
  5.  
  6. var community = new SteamCommunity();
  7. var SteamID = SteamCommunity.SteamID;
  8.  
  9. var steamClient = new Steam.SteamClient();
  10. var steamUser = new Steam.SteamUser(steamClient);
  11. var steamFriends = new Steam.SteamFriends(steamClient);
  12.  
  13. var client = new SteamUser();
  14.  
  15. var authCode = SteamTotp.generateAuthCode('ryp+1cShjPBC0l651U2JMpSQXgA=');
  16.  
  17. var logOnDetails = {
  18. "accountName": "borishuang1029",
  19. "password": "63826830a",
  20. "twoFactorCode": authCode,
  21. "disableMobile": false
  22. }
  23.  
  24. steamClient.connect();
  25.  
  26. steamClient.on('connected', function() {
  27. console.log("test");
  28. steamUser.logOn({
  29. "account_name": "borishuang1029",
  30. "password": "63826830a",
  31. "twoFactorCode": authCode
  32. });
  33. });
  34.  
  35. client.on('loggedOn', () => {
  36. console.log("Logged in!");
  37. steamBot();
  38. });
  39.  
  40. function steamBot() {
  41. steamFriends.on('friendMessage', function(steamid, message) {
  42. console.log(message);
  43. });
  44. }
  45. steamFriends.on('friendMessage', function(steamid, message) {
  46. console.log(message);
  47. });
  48.  
  49. /*
  50. community.login(logOnDetails, function(err, sessionID) {
  51. if (err) throw err;
  52. console.log(sessionID);
  53. community.chatLogon(500, 'web');
  54. steamBot();
  55. });
  56.  
  57.  
  58. function steamBot() {
  59. community.getTradeURL(function(err, url) {
  60. if (err) throw err;
  61. console.log(url);
  62. });
  63. community.chatMessage(function(sender, text) {
  64. console.log(sender);
  65. console.log(text);
  66. });
  67. }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement