Jump to content
McKay Development

Perport

Member
  • Posts

    16
  • Joined

  • Last visited

Contact Methods

  • Website URL
    https://steamcommunity.com/id/erdemgez

Recent Profile Visitors

845 profile views

Perport's Achievements

  1. Perport

    solved.

    Preport#0841 you can contact me on steam as well https://steamcommunity.com/id/erdemgez
  2. Perport

    solved.

    I don't know cause every time someone uses special command bot loads the steam group . So issue might be steam sided I'll try to test it when I get on my computer Edit: I couldn't find a solution about it so... Idk
  3. Perport

    solved.

    client.on("friendMessage", function (steamID, message) { if(message == "!test" || message == "!put these commands like this here you want only groupmembers to use" || message == "!anothercmd"){ getGroup("mygroupname",members => { if (members.length > 0) { if (message == "!test") { if (members.includes(steamID.accountid)) { client.chatMessage(steamID, "Test Message"); } else client.chatMessage(steamID, "You have to join our steam group"); } else if(message == "!membercmd2"){ // } } else { client.chatMessage(steamID, "bot is still loading message"); } }); } else if(message == "!help"){ } else if (message == "!idk"){ } else{ console.log("Unknown command type \"!help\" to see available commands") } }); This should I might have made some mistakes here and there I'm currently on mobile so I can't test it so try it and let me know. And Please indent this code or something it's starting to look weird.
  4. Perport

    solved.

    I couldn't get that can you explain a little more ?
  5. Perport

    solved.

    Then calling the getgroup function everytime someone messages you would help but probably slow down the response time but if you want to do it then this should work. And you can remove the getGroup from loggedOn event. function getGroup(groupName,callback) { groupmembers = []; community.getSteamGroup(groupName, (err, group) => { if (err) { console.log("Couldn't get the Group Retrying"); setTimeout((groupName) => { getGroup(groupName,callback) }, 5000); } else group.getMembers((err, members) => { if (err) { console.log("Couldn't get the Group Retrying.."); setTimeout((groupName) => { getGroup(groupName,callback) }, 5000); } else { members.forEach(member => { groupmembers.push(member.accountid); }); callback(groupmembers); console.log("Loaded The Group Members"); } }); }); } client.on("friendMessage", function (steamID, message) { getGroup("yourGroupName",members => { if (members.length > 0) { if (message == "!test") { if (members.includes(steamID.accountid)) { client.chatMessage(steamID, "Test Message"); } else client.chatMessage(steamID, "You have to join our steam group bla bla to use this bot or idk"); } } else { client.chatMessage(steamID, "bot is still loading message"); } }); });
  6. Perport

    solved.

    I justed tested it on a bigger group. It takes about a minute or so to load it so I though printing it to a console would help. Made the groupmembers var array from the beginning so it won't give you an error when someone types while it's still loading. Fixed few things about what bot does when it fails to get the group or its members. And made the array keep their accountids instead of steamid objects. Here is the code : client.on('loggedOn', () => { console.log("LoggedOn"); getGroup("yourgroupname"); client.setPersona(SteamUser.EPersonaState.LookingToTrade); client.gamesPlayed(["Test Bot", 730]); }); let groupmembers = []; function getGroup(groupName) { community.getSteamGroup(groupName, (err, group) => { if (err) { console.log("Couldn't get the Group Retrying"); setTimeout((groupName) => { getGroup(groupName) }, 5000); } else group.getMembers((err, members) => { if (err) { console.log("Couldn't get the Group Retrying.."); setTimeout((groupName) => { getGroup(groupName) }, 5000); } else { members.forEach(member => { groupmembers.push(member.accountid); }); console.log("Loaded The Group Members"); } }); }); } client.on("friendMessage", function (steamID, message) { if (groupmembers.length > 0) { if (message == "!test") { if (groupmembers.includes(steamID.accountid)) { client.chatMessage(steamID, "Test Message"); } else client.chatMessage(steamID, "You have to join our steam group bla bla to use this bot or idk"); } } else { client.chatMessage(steamID, "bot is still loading message"); } }); If you still have problems or questions feel free to ask
  7. Perport

    solved.

    Did you call the getGroup function ? Like client.on("loggedOn",()=>{ getGroup("reddit"); }
  8. const steamCommunity = require('steamcommunity'); let community = new steamCommunity({}); community.login({ "accountName": "name", "password": "password", },()=>{ community.getSteamGroup("reddit",(err,group) => { if(err)console.log("Couldn't get the group"); else group.join(); }); }); this should do it
  9. You defined offer variable twice in your code as constant please fix that. And for your problem offer.getPartnerInventoryContents(440, 2, (err, inventory,currency) => { } this should fix it yours has 4 inputs for some reason.
  10. That should work but don't make the offer variable constant use var or let instead.
  11. That's sad. Do you have any plans of implementing it ?
  12. Hi is it possible to do tradeups in tf2 using nodeTf2. I couldn't find it in the documentation and tf.craft doesn't work. Thanks in advance.
  13. Perport

    solved.

    const steamCommunity = require('steamcommunity'); const client = new steamUser(); let community = new SteamCommunity(); let groupmembers; // https://steamcommunity.com/groups/reddit 's group name would be "reddit" as a string // call getGroup on your code on client loggedOn event or somewhere else you want function getGroup(groupName) { community.getSteamGroup(groupName, (err, group) => { if (err) { console.log("Couldn't get the Group Retrying"); setTimeout(getGroup, 5000); } else group.getMembers((err, members) => { if (err) { console.log("Couldn't get the Group Retrying.."); setTimeout(getGroup, 5000); } else { groupmembers = members; } }); }); } client.on("friendMessage", (steamID,msg) => { if(groupmembers.includes(steamID.getSteamID64())){ //do your thing } else client.chatMessage(steamID,"You have to join our steam group bla bla to use this bot or idk"); }); this should work if you still have problems please let me know
  14. Thanks for replying so we have nothing to do except waiting.
  15. I tried that before but yesterday when I tried to do it I was able to craft few times before it started giving errors again. I opened my game after that and tried to craft I got an error which was "Crafting Failed: No Matching Blueprint". It's probably a temporary craft ban or something like that is there anyway I can get around that ? And is there a way to make GC update my steamcommunity backpack without making gamesPlayed([]) then gamesPlayed(440) ?
×
×
  • Create New...