no kod co mam, mam zatial len na prihlasenie (este toho moc nevie
). Mne ide skor o to že či to node.js bude pouzitelna pre stranku pre pracu s php, alebo či to nemam robit v niečom inom (popripade ako by som to na website ovladal kedže teraz to bezi v cmd prikazovom riadku).
Toto je kod
Kód:
var Steam = require("steam");
var SteamUser = require("steam-user");
var client = new SteamUser();
var friends = new Steam.SteamFriends(client.client);
client.logOn({
"accountName": "name",
"password": "password"
});
client.on("loggedOn", function(details){
console.log("Logged on to Steam! With the SteamID" + client.steamID.getSteam3RenderedID());
client.setPersona(SteamUser.Steam.EPersonaState.Online);
});
client.on("error", function(error){
console.log("WARNING: Error Found in Code");
});
friends.on("friendMsg", function(user, msg, type){
if(type == Steam.EChatEntryType.ChatMsg){
if(msg == "cau"){
friends.sendMessage(user, "Cau Miro !");
}
}
});
Zrejme by som dorobil aj ten trade len ide o to či mi to k niečomu bude. Ja to potrebujem pre web.