Jump to content
McKay Development

Group Announcement Not Posting


KindaIntellectual

Recommended Posts

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 :)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...