snowcrash Posted June 28, 2016 Report Posted June 28, 2016 I am trying to build a basic group chat bot. At the moment it looks like this.. var User = require('steam-user') var bot = new User() bot.logOn({ 'accountName': process.env.USERNAME, 'password': process.env.PASSWORD }) bot.on('loggedOn', function (res) { console.log('Logged in!') console.log(res) bot.setPersona(User.EPersonaState.Online) }) bot.on('webSession', function (sessionID, cookies) { console.log('Got a web session!') }) bot.on('friendMessage', function (steamID, message) { console.log(`message from ${steamID.getSteam3RenderedID()}: ${message}`) }) bot.on('chatInvite', function (inviterID, chatroomID) { bot.joinChat(chatroomID, function (eresult) { console.log(eresult) }) }) bot.on('error', function (e) { console.log(e) }) The call to the joinChat method is successful but the EResult is a 7 - "InvalidProtocolVer". I've been searching for information about how to handle this type of error and was hoping that maybe someone here has encountered it before. Quote
Dr. McKay Posted June 28, 2016 Report Posted June 28, 2016 I can't reproduce this with group chats or multi-user chats. Make sure all your modules are up to date. Quote
snowcrash Posted June 28, 2016 Author Report Posted June 28, 2016 I am using the latest version (3.9.0). Quote
Dr. McKay Posted June 28, 2016 Report Posted June 28, 2016 What kind of chat are you inviting the bot to join? Quote
snowcrash Posted June 28, 2016 Author Report Posted June 28, 2016 I have tried inviting it to a public Steam user group chat, and to a multi-user chat, and get an InvalidProtocolVer in each case. Quote
snowcrash Posted June 28, 2016 Author Report Posted June 28, 2016 (edited) Bummer. I've tried clearing npm cache, and even reinstalling Node. I think I'm going to try pushing to a remote and see if there isn't just something stupid happening with my local environment. EDIT: I've now tried the same script on a fresh DigitalOcean droplet and I still get InvalidProtocolVer trying to join a chat. FINAL EDIT: Well this is embarrassing.. I tried the above script with my own credentials and it worked! So I started investigating differences between my account, and the bot account.Which ultimately led me to this. I was receiving the error because the bot was a limited user. I added funds to its Steam wallet and it works as expected. Edited June 30, 2016 by snowcrash Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.