Jump to content
McKay Development
Ino

Get chat history

Recommended Posts

Hi, how can i get full chat history like in as steam chat ? When I using client.getChatHistory() I getting less messages than in steam chat in web browser, and after several times using this method - history would clear.


Can you add the method like in steam web chat for getting full history ? through websocket method or smth


Edited by Ino

Share this post


Link to post
Share on other sites

Have you tried getChatMessageHistory?

No, i haven't tried, but i trying now and getting empty messages, what i doing wrong ? ( i want to get history with my friend by steamid64 )

client.chat.getChatMessageHistory(null, id, {}, (err, response) => {
  console.log(err || response)
})
Edited by Ino

Share this post


Link to post
Share on other sites

getChatMessageHistory is only going to get messages for a chat room.

Okay, then it doesn't suit me? How i can get full message history with my friend ? Can you add method for this ?

Edited by Ino

Share this post


Link to post
Share on other sites

Tell me please, it's probably a bad idea - use getFriendMessageHistory very often, for example for spam detection?

About how many times a minute I can use it for sure so that it doesn't cause any problems?

 

Why would you need to use it that frequently? You get real-time notifications (through events) when friend messages are received.

Share this post


Link to post
Share on other sites

Why would you need to use it that frequently? You get real-time notifications (through events) when friend messages are received.

 

I just did not find a way how to check for identical messages from other bots. That is, my bot responds to any messages (sometimes with a delay), and there are situations like: [other bot say] Unknown command [my bot say] I do not understand [other] Unknown command [my] I do not understand etc.

I do not save any message history (but I save the number of messages in the last 10 seconds) and thought to check: if msg1 = msg2 = ... = msg5 - ignore some time.

 

Although in any case, I understand that this is a bad solution to my problem and it will be better to keep last messages in arr and check them.

Share this post


Link to post
Share on other sites

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