const
SteamUser = require('steam-user'),
SteamTotp = require('steam-totp'),
SteamCommunity = require('steamcommunity'),
steamConfig = require('../steam-bot/config.json'),
client = new SteamUser(),
community = new SteamCommunity(),
steamUserLogin = {
accountName: steamConfig.username,
password: steamConfig.password,
twoFactorCode: SteamTotp.generateAuthCode(steamConfig.sharedSecret)
},
steamGroupID = '103582791459977984';
var announcementHeadline = 'testheadline',
announcementContent = 'testcontent';
client.logOn(steamUserLogin);
client.on('loggedOn', function(){
console.log('Logged into steam');
});
client.on('websession', function(sessionid, cookies){
community.setCookies(cookies);
});
community.postGroupAnnouncement(steamGroupID, announcementHeadline, announcementContent, function(err){if (err) {console.log(err.message)} client.logOff()});
It logs into steam, waits a few seconds and then logs off. No error is returned. I checked the permissions, and I can post announcements manually. It seems to run the function as changing the group ID returns an error of invalid. Can you point me in the direction of what I'm doing wrong? Thank you for any and all help