Jump to content
McKay Development

Recommended Posts

Posted

No planned date yet.

Okay, then can you write documentation for your demo version node-steam-user v4, please ?

Posted

No planned date yet.

How does work method getChatMessageHistory ?

When i try to use id i get error TypeError: Cannot read property 'maxCount' of undefined

const option = { maxCount: 1000 }
client.chat.getChatMessageHistory( (id, id, option) ,messages => { console.log(messages) })
Posted

  1. You should not be using the same id for the first and second parameters. The first parameter is the group chat ID, and the second is the ID of the channel you're looking for.
  2. Get rid of the parens around the parameters. That's turning the commas into comma operators, which is not what you want to do.
Posted (edited)

 

  1. You should not be using the same id for the first and second parameters. The first parameter is the group chat ID, and the second is the ID of the channel you're looking for.
  2. Get rid of the parens around the parameters. That's turning the commas into comma operators, which is not what you want to do.

 

My bad, sorry. How can I get chat history with my friend? And how can I find out about group id and chat id to get history with my friend? I thought that i need to use a friend’s steamID64 as before

i have tried to using this method but every time i get null

https://github.com/DoctorMcKay/node-steam-user/blob/v4/components/chatroom.js#L77

client.chat.getGroups( groups => { console.log(groups) } ) // groups = null
Edited by Ino
Posted

 

My bad, sorry. How can I get chat history with my friend? And how can I find out about group id and chat id to get history with my friend? I thought that i need to use a friend’s steamID64 as before

i have tried to using this method but every time i get null

https://github.com/DoctorMcKay/node-steam-user/blob/v4/components/chatroom.js#L77

client.chat.getGroups( groups => { console.log(groups) } ) // groups = null

 

 

As in all callbacks, the first argument is err. And I'm pretty sure you'd want to still use getChatHistory as before.

Posted

As in all callbacks, the first argument is err. And I'm pretty sure you'd want to still use getChatHistory as before.

getChatHistory works bad because with time chat history lost and i want to try get history through new method.

Can you tell me how can i get chat id and group id for get chat history with my friend ?

Posted

Chat history is temporary for all chats, even group chats.

 

EWUEr.png

Okay, but how can i get chat_id & group_id for send message for example ?

Posted

getGroups

When i called this i get an empty object every time

client.chat.getGroups( (err, groups) => { console.log(groups.chat_room_groups) } ) // Object {}
Posted

You probably aren't in any groups.

But i have friends, how can i send message them using this method ?

SteamChatRoomClient.prototype.sendChatMessage = function(groupId, chatId, message, callback) {})

Posted (edited)

You don't, you use sendFriendMessage.

Thank you, i have last question. How can i send link like in steam ? What's options i need provide ?

https://gyazo.com/10cec7112e61627598031bf00b26c388

And how can i handle new messages from my friends ? In the new version if i use 2 accounts - event friendMessage emited 2 times. Int the old version it work normally, but version 4 emit that event as many times as I have accounts

Edited by Ino
Posted

Are you on the latest v4 commit? That sounds like a bug I fixed a couple weeks ago.

Yes, I even downloaded again just the same error

Posted

Are you on the latest v4 commit? That sounds like a bug I fixed a couple weeks ago.

 

Yes, I even downloaded again just the same error

Can you help me with this issue ?

Posted (edited)

Are you on the latest v4 commit? That sounds like a bug I fixed a couple weeks ago.

Try to do it. If send one message - this event will be emitted so many times, how much you have accounts. I think the problem with websockets, maybee all accounts connected to one websocket or smth any.

UPDT: Method gamesPlayed() don't work too

OYGg41M.png

const SteamUser = require("./node_modules/node-steam-user-4")

const client1 = new SteamUser()
const client2 = new SteamUser()
client1.logOn({
  accountName: '',
  password: ''
})
client2.logOn({
  accountName: '',
  password: ''
})

client1.on('friendMessage', (senderID, message) => {
  console.log(message)
})

client2.on('friendMessage', (senderID, message) => {
  console.log(message)
})
Edited by Ino

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