Jump to content


Photo

BREAKING CHANGES: steam-user v4 now available on npm

node.js node-steam-user

  • Please log in to reply
41 replies to this topic

#1 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,162 posts

Posted 15 January 2019 - 03:23 AM

v4 is now out!

 

There are a lot of breaking changes in v4. See the release notes on GitHub for all of the changes.

 

Major changes include:

  • Support for new Steam chat
  • Promise support for all methods that take callbacks (callbacks are still also supported)
  • Removal of deprecated methods
  • Addition of err parameter to all callbacks that previously lacked it
  • Node.js v8 or higher is now required

Edited by Dr. McKay, 26 April 2019 - 06:00 PM.


#2 PonyExpress

PonyExpress

    Advanced Member

  • Member
  • PipPipPip
  • 31 posts

Posted 16 January 2019 - 06:13 PM

Just wondering:
is there any way to check the number that the user got using /Random?

bot receives message from <sid>: test
bot receives message from <sid>: [random min="1" max="1000" result="872"][/random] // here I am sending "/Random 1000"
bot receives message from <sid>: [random min="1" max="1000" result="1000"][/random] // here I just send the string "[random min="1" max="1000" result="1000"][/random]"

I look forward to when steam-user v4 will be able to send pictures, links, emoticons, etc.



#3 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,162 posts

Posted 17 January 2019 - 05:18 AM

The result is the result of the random (same in /flip). In the second line of that block, the resulting random number was 872.



#4 byteframe

byteframe

    Member

  • Member
  • PipPip
  • 25 posts

Posted 17 January 2019 - 11:55 PM

'OS' is improperly capitalized in line 38 of components\helpers.js (getInternalMachineID)?

 

Where is the documentation for the new chat stuff again?<3


Edited by byteframe, 17 January 2019 - 11:59 PM.


#5 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,162 posts

Posted 18 January 2019 - 04:17 AM

'OS' is improperly capitalized in line 38 of components\helpers.js (getInternalMachineID)?

 

Where is the documentation for the new chat stuff again?<3

 

Beta 2 fixes OS capitalization.

 

New chat stuff does not yet have docs, but all the methods have jsdoc. SteamChatRoomClient is available as a chat property of your SteamUser instance, e.g. user.chat.sendFriendMessage(steamID, "/flip")


  • PonyExpress likes this

#6 byteframe

byteframe

    Member

  • Member
  • PipPip
  • 25 posts

Posted 18 January 2019 - 01:28 PM

Does the 'joinGroup' function to join a group chatroom function yet? It appears that it might be unimplemented.



#7 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,162 posts

Posted 18 January 2019 - 09:43 PM

Uhhh, good catch. It should work, but you won't get a response back yet.



#8 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,162 posts

Posted 19 January 2019 - 04:52 AM

Beta 3 is now on npm. Now featuring (most of) the docs for the new chat API!



#9 PonyExpress

PonyExpress

    Advanced Member

  • Member
  • PipPipPip
  • 31 posts

Posted 20 January 2019 - 02:15 AM

Since version 4, I often get a error:

fs.js:115
    throw err;
    ^
Error: EMFILE: too many open files, open 'C:\name\node_modules\@doctormckay\stats-reporter\package.json'

Could this be due to the fact that I use 'graceful-fs' instead 'fs'?



#10 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,162 posts

Posted 20 January 2019 - 02:38 AM

You have too many open files.

 

https://askubuntu.co...ind-the-culprit



#11 byteframe

byteframe

    Member

  • Member
  • PipPip
  • 25 posts

Posted 20 January 2019 - 06:13 PM

I got some error (when I didnt in maybe beta 1 or beta 2) when calling getInviteLinkInfo. I no longer need to call that function and didnt remember to copy the error.

 

the 'processChatGroupState' call in 'getInviteLinkInfo' (line #120) fails because the 'chat_rooms' property of the state object is undefined. I think I saw it in another place from the info result, so maybe something changed.

 

Other than that, the chat stuff in so far as I'm been using it is working well. I like it!



#12 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,162 posts

Posted 21 January 2019 - 05:28 PM

I got some error (when I didnt in maybe beta 1 or beta 2) when calling getInviteLinkInfo. I no longer need to call that function and didnt remember to copy the error.

 

the 'processChatGroupState' call in 'getInviteLinkInfo' (line #120) fails because the 'chat_rooms' property of the state object is undefined. I think I saw it in another place from the info result, so maybe something changed.

 

Other than that, the chat stuff in so far as I'm been using it is working well. I like it!

 

This is fixed in beta 4. Thanks for the detailed info.



#13 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 83 posts

Posted 22 January 2019 - 02:06 PM

Hi, still has problem with auth in version 4. Login takes too long time, and not saved guard code from e-mail, i need enter guard code from email every time, in the version 3.0 it's work better.



#14 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,162 posts

Posted 22 January 2019 - 05:56 PM

Hi, still has problem with auth in version 4. Login takes too long time, and not saved guard code from e-mail, i need enter guard code from email every time, in the version 3.0 it's work better.

 

Thanks for the info, that's fixed in beta 5.

 

With beta 5, steam-user v4 is now feature-complete (unless there's something major I missed). Now just waiting on some more thorough testing (please post your bugs!) and for me to finish the new chat docs.



#15 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 83 posts

Posted 23 January 2019 - 03:47 AM

Thanks for the info, that's fixed in beta 5.

 

With beta 5, steam-user v4 is now feature-complete (unless there's something major I missed). Now just waiting on some more thorough testing (please post your bugs!) and for me to finish the new chat docs.

Hello, after this fix a new bug has appeared with event 'user'

UPDT: Through time emitted error "LogonSessionReplaced" , but account don't used anywhere

Before fix

L9Ga7KD.png
After fix 

5G6rIzf.png


Edited by Ino, 23 January 2019 - 03:59 AM.


#16 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,162 posts

Posted 23 January 2019 - 05:05 PM

What is the bug?



#17 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 83 posts

Posted 23 January 2019 - 05:46 PM

What is the bug?

no data when emitted user, all values a null. First screenshot it's a before fix, second - after fix


Edited by Ino, 23 January 2019 - 05:47 PM.


#18 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,162 posts

Posted 23 January 2019 - 05:54 PM

Yes, that's normal. Originally v4 was going to fill in all values not sent by Steam with their defaults (e.g. 0 or empty string) but I decided against that and switched those values back to null (which is how it works in v3). Null means that those values were not sent to us by Steam at all, which is more correct than "assuming" 0 or empty string.


  • Ino likes this

#19 byteframe

byteframe

    Member

  • Member
  • PipPip
  • 25 posts

Posted 27 January 2019 - 06:16 PM

Do you think you will 'port' the chat code to node-steamcommunity? What's the future of the relationship between these two modules going forward?



#20 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,162 posts

Posted 28 January 2019 - 01:20 PM

Chat code will never be ported to node-steamcommunity. The new webchat is just a CM WebSocket connection established using a nonce retrieved from a web API. The same CM WebSocket connection is used by steam-user, so porting it to node-steamcommunity would basically just be copying and pasting all of node-steam-user.

 

I may, in the future, add a way to get the nonce from node-steamcommunity in order to login to node-steam-user, but that's about all that would make sense to be done.







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

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users