Jump to content
McKay Development

Recommended Posts

Posted (edited)

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
Posted

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.

Posted

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

 

Where is the documentation for the new chat stuff again?

 

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

Posted

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'?

Posted

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!

Posted

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.

Posted

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.

Posted

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.

Posted (edited)

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
Posted (edited)

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
Posted

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.

Posted

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.

Posted

I Trying to learn new features and I ran into several questions.

 

1:

chatMessage(recipient, message[, type]) -- This is deprecated. You should use SteamChatRoomClient instead, which is available as the chat property of each SteamUser instance.

I'm currently using:

client.on("friendMessage", (SENDER, MSG) => {
//...
});

Should I use something else and what benefits will it give?

I tried something like this, but it looks like I make a mistake:
client.on("chat", (SENDER, MSG) => {
client.chat.on("friendMessage", (SENDER, MSG) => {

 

2:

I can not understand what is "chat" and why it is necessary, where you can use it

// old:
client.chatMessage(SENDER, "bot say...");
// new:
client.chat.sendFriendMessage(SENDER, "bot say...");
Posted

client.chat.on("friendMessage", (SENDER, MSG) => { is the correct one to use.

 

It felt to me that having every method attached directly to SteamUser was getting kind of messy, so for v4 and new Steam chat I opted to create a separate "handler class" and attach it to SteamUser for interacting with new Steam chat. You can read the docs for new Steam chat here. Just remember that to use any method or event on that page, you need to use client.chat.methodName() or client.chat.on('eventName').

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