Jump to content
McKay Development

Recommended Posts

Posted

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.

Posted

no output,

add console.log(success) and see what it outputs. Also put  how your code looks now here. and try writing the event listener before the method. Maybe the event is being emitted before the listener starts working

Posted
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

Posted

 

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?

Posted

yes,i tryed and dont work

 

Well i don't see nothing wrong on it. There's other option. Try with:

client.getChatHistory(sid, function(success, message){
  console.log(success);
  console.log(message);
});

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