Jump to content
McKay Development

timgfxx

Member
  • Posts

    9
  • Joined

  • Last visited

Posts posted by timgfxx

  1. Can I see the code that creates the chat and invites the users?

                client.createChatRoom(null, senderID, function(result, chatID) {
                    client.inviteToChat(chatID.getSteamID64(), owner);
                    client.chatMessage(owner, "\nA user needs support: steam://friends/joinchat/" + chatID.getSteamID64());
                    client.chatMessage(senderID, "\nA new chat has been created.\nClick here to join the chat: steam://friends/joinchat/" + chatID.getSteamID64());
                });
    

    Thats called when the bot receives "support" as a message

  2. There isn't any debug mode that would be terribly useful for this, I'm afraid.

    Another question,

    Why is this called twice? (Line 103 and 105)

    msg.writeUint64(this.steamID.getSteamID64());
    

     Maybe you have to change this.steamID to steamID, because:

    SteamUser.prototype.leaveChat = function(steamID) {
    

    Testing it out right now!

  3. This is a bug in the module. How frequently does this happen? Is there a reproducible test case?

    It happens every time. What I did was use a timeout to delay it by 3 seconds, which worked at first, but still often gives this error:

     

    https://i.gyazo.com/132dd4ff83f1fa01f762aaa6c0deaa24.png.

     

    It doesnt always happen everytime, it does like every 30 minutes.

     

    Is there a way of fixing this? And what causes this?

  4. I might be doing this wrong. This is my code:

    client.on("chatUserLeft", function(chatID, userID) {
        if (userID.getSteamID64() !== owner) {
            client.chatMessage(userID, "I hope your issue has been resolved! Whenever you have another question feel free to open another chat :)");
        }
        client.leaveChat(chatID);
    });
    

    owner = my steamid64.

     

    The error I'm getting:

    C:\Users\Tim\Desktop\Steam Bots\Assistant\node_modules\steam-user\components\chat.js:512
                            delete this.chats[sid64].members[target64];
                                                    ^
    
    TypeError: Cannot read property 'members' of undefined
        at SteamUser._handlers.(anonymous function) (C:\Users\Tim\Desktop\Steam Bots\Assistant\node_modules\steam-user\components\chat.js:512:28)
        at SteamUser._handleMessage (C:\Users\Tim\Desktop\Steam Bots\Assistant\node_modules\steam-user\components\messages.js:198:29)
        at emitThree (events.js:116:13)
        at CMClient.emit (events.js:194:7)
        at CMClient._netMsgReceived (C:\Users\Tim\Desktop\Steam Bots\Assistant\node_modules\steam-client\lib\cm_client.js:278:8)
        at CMClient.handlers.(anonymous function) (C:\Users\Tim\Desktop\Steam Bots\Assistant\node_modules\steam-client\lib\cm_client.js:386:8)
        at CMClient._netMsgReceived (C:\Users\Tim\Desktop\Steam Bots\Assistant\node_modules\steam-client\lib\cm_client.js:260:24)
        at emitOne (events.js:96:13)
        at TCPConnection.emit (events.js:188:7)
        at TCPConnection._readPacket (C:\Users\Tim\Desktop\Steam Bots\Assistant\node_modules\steam-client\lib\tcp_connection.js:73:7)
     [nodemon] app crashed - waiting for file changes before starting...
    
    

    Help is appreciated.

×
×
  • Create New...