Jump to content
McKay Development

Function on getchatHistory


SP0OK3R

Recommended Posts

Are you using the method getChatHistory? Also the event name is chatHistory.

 

First you have to use the method

client.getChatHistory(aaaaaaaaa)

Then you can listen to the event

client.on('chatHistory', function(steamid, success, messages){
  console.log(messages)
})

Please read all the Documentation.

Link to comment
Share on other sites

var SteamUser = require('steam-user');
var SteamTotp = require('steam-totp');
var config = require('./config.json');
 

// SaveStrings
var Username = config.username;
var Password = config.password;
// SaveStrings

var client = new SteamUser();

//Small fix: Dual-Session Chat, pervents from see Friends offline;
function SteamPersonaRestart(){client.setPersona(0);client.setPersona(1);}

client.logOn({
"accountName": Username,
"password": Password,
"machineName": Username,
"twoFactorCode": SteamTotp.generateAuthCode(config.Phone_secret)
});

client.on('loggedOn', function (details) {
client.setPersona(1);
console.log("LOGGED");
});
 
var sid= "76561198041931474";
client.getChatHistory(sid)

client.on('chatHistory', function(steamid, success, messages){
console.log(messages)
console.log(success);
})

 

nothing appers

Link to comment
Share on other sites

 

var SteamUser = require('steam-user');
var SteamTotp = require('steam-totp');
var config = require('./config.json');
 

// SaveStrings
var Username = config.username;
var Password = config.password;
// SaveStrings

var client = new SteamUser();

//Small fix: Dual-Session Chat, pervents from see Friends offline;
function SteamPersonaRestart(){client.setPersona(0);client.setPersona(1);}

client.logOn({
"accountName": Username,
"password": Password,
"machineName": Username,
"twoFactorCode": SteamTotp.generateAuthCode(config.Phone_secret)
});

client.on('loggedOn', function (details) {
client.setPersona(1);
console.log("LOGGED");
});
 
var sid= "76561198041931474";
client.getChatHistory(sid)

client.on('chatHistory', function(steamid, success, messages){
console.log(messages)
console.log(success);
})

 

nothing appers

 

Did you try writing  the client.on('chatHistory',..) part before client.getChatHistory?

Link to comment
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...