Jump to content


Photo

Question about SteamGuard and posts/events made in a steamgroup

node.js node-steam-user

  • Please log in to reply
9 replies to this topic

#1 Vaas Kahn Grim

Vaas Kahn Grim

    Newbie

  • Member
  • Pip
  • 6 posts

Posted 29 August 2019 - 12:27 AM

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.



#2 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,212 posts

Posted 29 August 2019 - 01:00 AM

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.



#3 Vaas Kahn Grim

Vaas Kahn Grim

    Newbie

  • Member
  • Pip
  • 6 posts

Posted 29 August 2019 - 02:47 AM

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.



#4 Vaas Kahn Grim

Vaas Kahn Grim

    Newbie

  • Member
  • Pip
  • 6 posts

Posted 29 August 2019 - 03:08 AM

nvm I managed to fix it by removing the twoFactorCodeL part of loginoptions, tho it things EPersonaState is undefined



#5 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,212 posts

Posted 29 August 2019 - 06:51 PM

Just use SteamUser.EPersonaState.Online



#6 Vaas Kahn Grim

Vaas Kahn Grim

    Newbie

  • Member
  • Pip
  • 6 posts

Posted 30 August 2019 - 07:21 AM

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.`)


#7 Vaas Kahn Grim

Vaas Kahn Grim

    Newbie

  • Member
  • Pip
  • 6 posts

Posted 30 August 2019 - 08:00 AM

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



#8 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,212 posts

Posted 30 August 2019 - 07:51 PM

It doesn't look like you ever logged in.



#9 Vaas Kahn Grim

Vaas Kahn Grim

    Newbie

  • Member
  • Pip
  • 6 posts

Posted 30 August 2019 - 08:53 PM

That snippet is right under the code I originally posted before for the steam-user and steam-totp libs.



#10 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,212 posts

Posted 31 August 2019 - 12:58 AM

You need to use community.setCookies() to log SteamCommunity into Steam.







Also tagged with one or more of these keywords: node.js, node-steam-user

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users