Jump to content
McKay Development

Recommended Posts

Posted

please help when i call postUserComment it says the settings on this account do not allow you to add comments, but i can manually add comments , here is all my code, please HELP!!

 

const TradeOfferManager = require('steam-tradeoffer-manager');
const SteamCommunity = require('steamcommunity');
var steamParental = require('steam-parental');
const SteamUser = require('steam-user');
var prompt = require('prompt');
var math = require('mathjs');
 
require('console-stamp')(console, '[HH:MM:ss]');
 
const client = new SteamUser();
const community = new SteamCommunity();
const manager = new TradeOfferManager ({
steam: client,
community: community,
language: 'en'
});
 
var schema = {
    properties: {
      Account_Name: {
 
      },
      Password: {
        hidden: true,
        replace: '*'
      },
    }
  };
 
  prompt.start();
 
  prompt.get(schema, function (err, result) {
 
    // console.log('  name: ' + result.AccountName);
    // console.log('  password: ' + result.Password);
 
    const logOnOptions = {
accountName: result.Account_Name,
password: result.Password,
};
// Disables asking for Steam Guard Code
client.setOption("promptSteamGuardCode", true);
 
client.logOn(logOnOptions);
 
client.on('loggedOn', () => {
client.on("accountInfo", function(name, country) {
   console.log(' ');
console.log('-----------------------------------');
console.log('Succesfully logged in as: ' + result.Account_Name);
console.log("Your Online Name: " + name);
console.log("Your Country: " + country);
console.log('-----------------------------------');
console.log('Now Blocking Group Invites');
console.log('-----------------------------------');
console.log(' ');
client.setPersona(SteamUser.Steam.EPersonaState.Online);
client.gamesPlayed(["BOT TESTING",271590]);
// client.gamesPlayed(271590); //Playing GTA 5
 
client.on('webSession', (sessionid, cookies) => {
manager.setCookies(cookies);
community.setCookies(cookies);
 
});
 
var Dets = {
    properties: {
      SteamID64: {
 
      },
      comment: {
 
      },
      times: {
 
      },
    }
  };
 
  prompt.start();
 
  prompt.get(Dets, function (err, result) {
  // console.log("SteamID64: " + result.SteamID64);
  // console.log("what to comment: " + result.comment);
  // console.log("how many times: " + result.times);
 
      for(var i = 0; i < result.times;i++){
  community.postUserComment(76561198398342583, 'test', (err) => { 
  console.log(err);
  }
        
  );
};
});
});
});
});
 
client.on('groupRelationship', function (steamID, relationship) {
if (relationship == SteamUser.Steam.EClanRelationship.Invited){
//console.log("Succesfully Decline Group Invite From" + " " + steamID);
client.respondToGroupInvite(steamID, false);
console.log("Declined Steam Group Invite");
}
});
 
client.on("friendMessage", function(steamID, message, type) {
client.getPersonas([steamID], function(personas) {
var persona = personas[steamID];
var name = persona ? persona.player_name : ("[" + steamID + "]");
console.log("Friend message from " + name + ": " + message);
 
});
});
// client.on('friendRelationship', function(steamID, relationship) {
 
//     if (relationship == SteamUser.Steam.EFriendRelationship.RequestRecipient) {
//         client.addFriend(steamID);
//         console.log(" ");
//         console.log("Accepted friend request from: " + steamID);
//         client.chatMessage(steamID, "Welcome To My Bot, type !help to get started!");
//     }
//     });
 
// client.on('friendRelationship', function(steamID, relationship) {
 
//     if (relationship == SteamUser.Steam.EFriendRelationship.None) {
//     console.log(" ");
//         console.log("you have been deleted by: " + steamID);
//         }
//     });
 
// client.on("newComments", function(count) {
// console.log("You have " + count + " new comments on your profile");
// });
 
// client.on("newItems", function(count) {
// console.log("You have " + count + " new items in your inventory");
// });
 
// client.on("tradeOffers", function(count) {
// console.log("You have " + count + " new trade offers");
// });
 
// client.on("offlineMessages", function(count) {
// console.log("You have " + count + " unread messages");
// });
 
client.on("friendMessage", function(steamID, message) {
if (message == "!help") {
client.chatMessage(steamID, "Type !starwars for a cool quote");
}
});
 
client.on("friendMessage", function(steamID, message) {
if (message == "!help") {
client.chatMessage(steamID, "Type !csgo for something funny");
}
});
 
client.on("friendMessage", function(steamID, message) {
if (message == "!starwars") {
client.chatMessage(steamID, "The Force will be with you. Always. — Obi-Wan Kenobi");
}
});
 
client.on("friendMessage", function(steamID, message) {
if (message == "!csgo") {
client.chatMessage(steamID, "You bought the game for russain lessons, right?");
}
});
// This will fire when we receive a chat message from ANY friend
// client.on('friendMessage', function(steamID, message) {
// console.log("Friend message from " + steamID.getSteam3RenderedID() + ": " + 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...