Jump to content
McKay Development

How do I automatically get another users Steam ID?


Recommended Posts

Posted
1 hour ago, Dr. McKay said:

How to get a user's SteamID depends on how you know what user you want to trade with.

I am using Steam chat commands.  So when someone says "!buy x" it will send them a trade offer for the specific items on both parties.

Posted
1 hour ago, Dr. McKay said:

The chatter's SteamID is available in the event that delivers you the chat message.

I know this is a dumb question but how would I call the SteamID from the chat message?

I have the code 

client.chatMessage(steamID, "Setting up the trade offer for Test Item");
const offer = manager.createOffer(steamID);

Is this the correct way to call it?

Posted
6 minutes ago, PlanZed said:

I know this is a dumb question but how would I call the SteamID from the chat message?

I have the code 


client.chatMessage(steamID, "Setting up the trade offer for Test Item");
const offer = manager.createOffer(steamID);

Is this the correct way to call it?

That should work but don't make the offer variable constant use var or let instead.

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