Jump to content
McKay Development

Recommended Posts

Posted

HI,

  I'm having trouble employing the group invite function of the steam-user module.  My script is very simple, and meant to just invite the user to a designated group upon login:

const SteamUser = require('steam-user');
const net = require('net');
const client = new SteamUser();
const SteamID = require('steamid');

///First, log into Steam

const logOnOptions = {
	accountName: 'xxx',
	password: 'xxx' //Disable your steam guard
};

client.logOn(logOnOptions);

client.on('loggedOn', () => {
	console.log("Logged into Steam as " + client.steamID.getSteam3RenderedID());
	client.setPersona(SteamUser.EPersonaState.Online);
	client.gamesPlayed(440);
	var sid = new SteamID("103582791434188513");
	client.inviteToGroup( "76561198161775645", sid );
});

client.on('accountLimitations', function(limited, communityBanned, locked, canInviteFriends) {
	var limitations = [];

	if (limited) {
		limitations.push('LIMITED');
	}

	if (communityBanned) {
		limitations.push('COMMUNITY BANNED');
	}

	if (locked) {
		limitations.push('LOCKED');
	}

	if (limitations.length === 0) {
		console.log("Our account has no limitations.");
	} else {
		console.log("Our account is " + limitations.join(', ') + ".");
	}

	if (canInviteFriends) {
		console.log("Our account can invite friends.");
	}
});

The output is as follows:

jDlXOLh.png

And yet, I don't receive any invitation.  The SteamID64 and GroupID64 are both valid, so why might I have this issue?

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