Jump to content


Photo
Question

How to get user's nickname?

node.js node-steam-user

  • Please log in to reply
6 replies to this topic

#1 Meshi8

Meshi8

    Newbie

  • Member
  • Pip
  • 9 posts

Posted 09 June 2018 - 09:59 AM

Hi,

 

I'm trying to get a user's nickname.

 

I know I'm supposed to use getUserDetails and then getPersonas, but what's the nickname property called?



#2 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,652 posts

Posted 09 June 2018 - 09:51 PM

Nickname as in the private name you gave the user, or nickname as in the user's profile (persona) name?



#3 Meshi8

Meshi8

    Newbie

  • Member
  • Pip
  • 9 posts

Posted 09 June 2018 - 11:53 PM

Nickname as in the private name you gave the user, or nickname as in the user's profile (persona) name?

Private name i gave the user



#4 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,652 posts

Posted 11 June 2018 - 11:22 AM

https://github.com/D...ser#mynicknames



#5 . Marsh.Mello .

. Marsh.Mello .

    Newbie

  • Member
  • Pip
  • 1 posts

Posted 13 June 2018 - 03:34 AM

 

I'm a bit confused how I am meant to add this.

Is there any examples?



#6 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,652 posts

Posted 13 June 2018 - 11:31 AM

How to add it?



#7 Cool Guy123

Cool Guy123

    Newbie

  • Member
  • Pip
  • 6 posts

Posted 15 June 2018 - 12:52 AM

like that ?

for (let i = 0; i != Object.keys(client.myNicknames).length; i++) {
  let steamid = Object.keys(client.myNicknames)[i]
  let nickname = client.myNicknames[steamid]
  console.log(steamid.toString() + ": " + nickname)  //76561198051814480: My Best Buddy
}

Edited by Cool Guy123, 15 June 2018 - 12:52 AM.






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

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users