Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
1,114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. const SteamUser = require('steam-user'); // Replace this with `require('steam-user');` if used outside of the module directory
  2. var client = new SteamUser();
  3.  
  4. var username = "your_username";
  5. var password = "your_password";
  6. var message = "your message to new friends";
  7.  
  8. // the amount of time in milliseconds that the bot waits between receiving friend request -> accepting friend request
  9. // and also between accepting friend request -> sending message (2000 = 2 seconds)
  10. var delay = 2000;
  11.  
  12. client.logOn({
  13. "accountName": username,
  14. "password": password
  15. });
  16.  
  17. client.on('loggedOn', function(details) {
  18. console.log("Logged into Steam as " + client.steamID.getSteam3RenderedID());
  19. client.setPersona(SteamUser.EPersonaState.Online);
  20. });
  21.  
  22. client.on('friendRelationship', (steamid, relationship) => {
  23. if (relationship === 2) {
  24. setTimeout(function() {
  25. client.addFriend(steamid);
  26. client.setNickname(steamid,"rl bot added")
  27. setTimeout(function() {
  28. client.chatMessage(steamid, message);
  29. console.log("added and replied to user: " + steamid)
  30. }, delay);
  31. }, delay);
  32. }
  33. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement