Vaas Kahn Grim Posted August 29, 2019 Report Posted August 29, 2019 Basically I'm trying to figure out how to use the node module steam-user to create a steambot in order to send announcements to a steamgroup via the vents and to make posts/threads under a steamgroups discussions section.So far setting up the code for getting the bot working was easy enough with the tutorial, however I'm currently stuck with the problem of logging in. I've not tested my code yet because I already know its not going to work without propperly setting up a way to use the code steam will end up emailing me.basically I just want a quick rundown of how to get this thing running with steamguard on.after that I'd just like to know what functions I'd need for steamgroup related stuff since the github page didn't really go over how to make posts,threads and events. it only seemed to go over detecting when they happen to be made by others it seemed. Quote
Dr. McKay Posted August 29, 2019 Report Posted August 29, 2019 If you're using steam-user and your account has email-based Steam Guard enabled, when you run the bot and Steam prompts for a code, the module will automatically prompt you to enter the code. Once you do and hit enter, it will proceed with the login. You can post group announcements using steamcommunity, but discussion forums are not supported and are unlikely to ever be, due to spam concerns. Quote
Vaas Kahn Grim Posted August 29, 2019 Author Report Posted August 29, 2019 odd, it seems to be giving me an issue where the password is invalid even tho its not //Steam Handling const SteamUser = require('steam-user'); const SteamTotp = require('steam-totp'); const SteamConfig = require('./steamconfig.js'); const SteamClient = new SteamUser(); const logInOptions = { accountName: SteamConfig.accountName, password: SteamConfig.password, twoFactorCode: SteamTotp.generateAuthCode(SteamConfig.sharedSecret) }; SteamClient.logOn(logInOptions); SteamClient.on('loggedOn',() =>{ console.log('logged on'); SteanClient.setPersona(SteamUser.Steam.EPersonaState.Online); //SteamClient.gamesPlayed(4000); }); and the config is currently this module.exports = { accountName: 'USERNAME_HIDDEN', password: 'PASSWORD_HIDDEN', sharedSecret: '' } and the error it gives me InvalidPassword. I know that the password and username are correct for sure since I verified it by logging into steam with my second account with the cridentials and it worked just fine then. however with the module on node it just says the password is invalid. Quote
Vaas Kahn Grim Posted August 29, 2019 Author Report Posted August 29, 2019 nvm I managed to fix it by removing the twoFactorCodeL part of loginoptions, tho it things EPersonaState is undefined Quote
Dr. McKay Posted August 29, 2019 Report Posted August 29, 2019 Just use SteamUser.EPersonaState.Online Quote
Vaas Kahn Grim Posted August 30, 2019 Author Report Posted August 30, 2019 So looking through the wiki page you sent before I just want to make sure I have the steamgroup steamid handled right in this var SteamCommunity = require('steamcommunity'); var community = new SteamCommunity(); community.scheduleEvent("103582791460315633","Event Annocement Name String","OtherEvent",`We are starting an event on Server 1! /n/n Hop on immediatly to participate! We will be doing a assault on the enemy. /n/n Be prepared ASAP. /n/n Command. Out.`) Quote
Vaas Kahn Grim Posted August 30, 2019 Author Report Posted August 30, 2019 well the first attempt didn't work, so I tried this var SteamCommunity = require('steamcommunity'); var community = new SteamCommunity(); community.postGroupAnnouncement("103582791460315633","Test Annocement","Testing",(err) => { console.log(err); }) However it prints NULL into the console so I know it sent it somewhere and no error was recived but I don't see any post made in the group announcements. So I'm not sure what to do here Quote
Dr. McKay Posted August 31, 2019 Report Posted August 31, 2019 It doesn't look like you ever logged in. Quote
Vaas Kahn Grim Posted August 31, 2019 Author Report Posted August 31, 2019 That snippet is right under the code I originally posted before for the steam-user and steam-totp libs. Quote
Dr. McKay Posted August 31, 2019 Report Posted August 31, 2019 You need to use community.setCookies() to log SteamCommunity into Steam. 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.