Jump to content
McKay Development

Slime

Member
  • Posts

    8
  • Joined

  • Last visited

Slime's Achievements

  1. I've delayed it but it still doesn't seems to send all messages and always the same people get messaged... function messageAllCommand() { var messageAll = readlineSync.question('Enter message: '); for (var friend in client.myFriends) { console.log(friend); client.chatMessage(friend, messageAll); await sleep(100); } } function sleep(ms) { return new Promise(resolve => { setTimeout(resolve, ms); }); I've just noticed that everyone who didn't get the message haven't spoke with me for a while. and even people it didn't send the message to got it after i talked with them... wierd...
  2. I've tried sending all my friends a message. so i made a function for that: function messageAllCommand() { var messageAll = readlineSync.question('Enter message: '); for (var friend in client.myFriends) { console.log(friend); client.chatMessage(friend, messageAll); } }but somewhy, it seems really random who gets the message tho it prints everyone's id it but still don't send everyone the message. here are the ID's: https://pastebin.com/5NGqV340 E.G: it printed the user id: 76561198278317090 but didn't sent the message. and it printed the user id: 76561198173748582 this time it sent the message. I checked and friendsList was emitted before BTW this forum is real good and i get answers.
  3. Thanks for the info and the quick answer as always. i've made this and it works if anyone wants it: client.on('friendsList', function () { console.log("Searching for friend requests..."); for (var i = 0; i < Object.keys(client.myFriends).length; i++) { if (client.myFriends[Object.keys(client.myFriends)[i]] == SteamUser.EFriendRelationship.RequestRecipient) { console.log("Added " + Object.keys(client.myFriends)[i]); client.addFriend(Object.keys(client.myFriends)[i]); client.getChatHistory(Object.keys(client.myFriends)[i]); } } });
  4. It seems to be working tho the client.myFriends don't include the users that are waiting for you to accept thier friend request... Is there a way to get them from any other array or something? Thanks for the quick respond btw.
  5. I would like it to accept everyone who added me when the bot wasn't opened. i've tried to do that but i think i didn't get how it works, here's what i tried: client.on('loggedOn', () => { client.setPersona(1); client.getPersonas(client.myFriends); }); client.on('user', function (sid, user) { console.log(sid + " " + user.value); if (user.value == 2) { client.addFriend(sid); client.getChatHistory(sid); } });
  6. 1. Is there a way to invite people to a steam lobby? (not chat one). the one that emits the 'lobbyInvite' ID event... 2. the 'friendOrChatMessage' ID event emit also when i write a message in a chat. how can i detect whether it is me or not, because the senderID isn't my id even if i write the message (in dm's only). the senderID it is the friend whom i wrote to... (maybe it's a bug so idk). 3. Is there any way to wait for a user input in the console while executing other functions that run on the same js file?
×
×
  • Create New...