Dr. McKay Posted January 15, 2019 Report Posted January 15, 2019 (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 chatPromise support for all methods that take callbacks (callbacks are still also supported)Removal of deprecated methodsAddition of err parameter to all callbacks that previously lacked itNode.js v8 or higher is now required Edited April 26, 2019 by Dr. McKay Quote
PonyExpress Posted January 16, 2019 Report Posted January 16, 2019 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. Quote
Dr. McKay Posted January 17, 2019 Author Report Posted January 17, 2019 The result is the result of the random (same in /flip). In the second line of that block, the resulting random number was 872. Quote
byteframe Posted January 18, 2019 Report Posted January 18, 2019 (edited) 'OS' is improperly capitalized in line 38 of components\helpers.js (getInternalMachineID)? Where is the documentation for the new chat stuff again?<3 Edited January 18, 2019 by byteframe Quote
Dr. McKay Posted January 18, 2019 Author Report Posted January 18, 2019 '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") PonyExpress 1 Quote
byteframe Posted January 18, 2019 Report Posted January 18, 2019 Does the 'joinGroup' function to join a group chatroom function yet? It appears that it might be unimplemented. Quote
Dr. McKay Posted January 19, 2019 Author Report Posted January 19, 2019 Uhhh, good catch. It should work, but you won't get a response back yet. Quote
Dr. McKay Posted January 19, 2019 Author Report Posted January 19, 2019 Beta 3 is now on npm. Now featuring (most of) the docs for the new chat API! Quote
PonyExpress Posted January 20, 2019 Report Posted January 20, 2019 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'? Quote
Dr. McKay Posted January 20, 2019 Author Report Posted January 20, 2019 You have too many open files. https://askubuntu.com/questions/181215/too-many-open-files-how-to-find-the-culprit Quote
byteframe Posted January 20, 2019 Report Posted January 20, 2019 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! Quote
Dr. McKay Posted January 21, 2019 Author Report Posted January 21, 2019 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. Quote
Guest Ino Posted January 22, 2019 Report Posted January 22, 2019 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. Quote
Dr. McKay Posted January 22, 2019 Author Report Posted January 22, 2019 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. Quote
Guest Ino Posted January 23, 2019 Report Posted January 23, 2019 (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 anywhereBefore fixAfter fix Edited January 23, 2019 by Ino Quote
Guest Ino Posted January 23, 2019 Report Posted January 23, 2019 (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 January 23, 2019 by Ino Quote
Dr. McKay Posted January 23, 2019 Author Report Posted January 23, 2019 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. Quote
byteframe Posted January 27, 2019 Report Posted January 27, 2019 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? Quote
Dr. McKay Posted January 28, 2019 Author Report Posted January 28, 2019 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. Quote
byteframe Posted January 29, 2019 Report Posted January 29, 2019 Oh ok, I thought it was going to be a situation like before whereby the 'old webchat' was available in steam-community, ehh, because it was 'web based'. Quote
Dr. McKay Posted January 30, 2019 Author Report Posted January 30, 2019 v4 is now out of beta and is live on npm. Quote
byteframe Posted January 31, 2019 Report Posted January 31, 2019 huzzahs are in order. Dr. McKay 1 Quote
PonyExpress Posted February 2, 2019 Report Posted February 2, 2019 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..."); Quote
Dr. McKay Posted February 3, 2019 Author Report Posted February 3, 2019 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'). Quote
Recommended Posts
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.