Jump to content
McKay Development

Emily

Member
  • Posts

    16
  • Joined

  • Last visited

Everything posted by Emily

  1. Emily

    solved.

    ok thanks for everything buddy do you have a discord address that i can reach you? I have a lot of questions about the steam bot, I am thinking about opening new topics @Perport
  2. Emily

    solved.

    Thank you I checked the coding again and corrected my shortcomings now everyone can use other commands I have a question When the person leaves the group, he can still use that command, and someone who joins the group waits for a few minutes to use that command. Can we set this wait time? so I don't want him to use the command instantly when he leaves the group and the person joining the group should not wait, use that command directly
  3. Emily

    solved.

    so i mean 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("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 { client.chatMessage(steamID, "bot is still loading message"); } } else if (message == "!help") { client.chatMessage(steamID, "Test Message"); } else { client.chatMessage(steamID, "You wrote an unknown command. You can type !commands to learn commands."); } console.log("Message Sender steamID: " + steamID.getSteam3RenderedID() + ": " + message); }); this is the sample code I can only use the first command, I want everyone to use the other commands, but other commands don't work so !help doesn't work I hope you understand thanks in advance <3
  4. Emily

    solved.

    ok ReferenceError: members is not defined i solved your mistake my current problem is that I want one command to use only group member, doesn't recognize other commands
  5. Emily

    solved.

    ReferenceError: members is not defined
  6. Emily

    solved.

    Thank you man how long have I been looking for this code now the person who is a member of the group is using it, but there is another problem, when this person leaves the group, he still continues to use that command. @Perport and I can't use this command after joining the group
  7. Emily

    solved.

    if(groupmembers.includes(steamID.getSteamID64())){ I'm still getting this error :( Cannot read property 'includes' of undefined client.on('loggedOn', () => { getGroup("mygroupname"); 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(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", function(steamID, message) { if (message == "!test") { if(groupmembers.includes(steamID.getSteamID64())){ client.chatMessage(steamID, "Test Message"); } else client.chatMessage(steamID,"You have to join our steam group bla bla to use this bot or idk"); }}) I did it this way but I get the error I said
  8. Emily

    solved.

    Cannot read property 'includes' of undefined
  9. Emily

    solved.

    how can i do that can you help me please i need it @xLeeJYx
  10. Emily

    solved.

    @xLeeJYx can you code sample?
  11. Emily

    solved.

    I'm sorry I couldn't understand what you said not a steam chat room group people who add the steam bot must be a member of the group to use all commands @vrtgn and, i want people who are not members of the group to send a "you must be a member of the group" message it starts like this client.on("friendMessage", function(steamID, message) { if (message == "!help") { client.chatMessage(steamID, "message); } } else if (message == "!info") { client.chatMessage(steamID, "message"); .. .. .. how can i add as i said? please help me
  12. Emily

    solved.

    client.on("friendMessage", function(steamID, message) { if (message == "!help") { //code } } else if (message == "!info") { I want to do I want only the members of the group to use the !help command. I want people who are not members of the group to send a "you must be a member of the group" message
  13. Emily

    solved.

    I want to use the contacts in groupID, not the steam ID of the people in my group.
  14. Emily

    solved.

    can you code sample? For example, I want to use the !help command only by people who are members of the group.
×
×
  • Create New...