Lonster_Mosnter Posted September 9, 2017 Report Share Posted September 9, 2017 Hi i am creating my own steam trade bot am i have got a comments section and wandering how to have it the way it will not comment on my profile Only. Here is what i got so far if (config.Comments == "Enable") {if (steamID === 76561198076819824) {if (CreatorComs === 0){} else {manager.on('receivedOfferChanged', (offer)=>{if(offer.state === 3){community.postUserComment(offer.partner.toString(), "Comment", (err)=>{if(err) throw err.messagecommunity.postUserComment(offer.partner.toString(), math.pickRandom([Comments.comments0, Comments.comments1, Comments.comments2, Comments.comments3, Comments.comments4, Comments.comments5]));});}})}}} else{console.log('\x1b[33m WARNING\x1b[37m: Cannot comment on user profiles becasue config.Comments is set to false. ');} when i run the bot it says line 284 steamID is not defined but i have the steam , SteamTotp, SteamUser, TradeOfferManager and SteamCommunity modules and steamID should be defined because of the i think Steamcommunity module Quote Link to comment Share on other sites More sharing options...
Lonster_Mosnter Posted September 9, 2017 Author Report Share Posted September 9, 2017 I got it i usedif (config.Comments == "Enable") {manager.on('receivedOfferChanged', (offer)=>{if(offer.state === 3){ if (community.postUserComment(offer.partner.toString())) { if (offer.partner.toString() === 76561198076819824){ if (CreatorComs.Comments === 0){ } }}} else { if (community.postUserComment(offer.partner.toString(), "Comment")) {community.postUserComment(offer.partner.toString(), "Comment", (err)=>{if(err) throw err.messagecommunity.postUserComment(offer.partner.toString(), math.pickRandom([Comments.comments0, Comments.comments1, Comments.comments2, Comments.comments3, Comments.comments4, Comments.comments5]));});} else {console.log('\x1b[33m WARNING\x1b[37m: Cannot comment on user profiles becasue config.Comments is set to false. ');}}})} Quote Link to comment Share on other sites More sharing options...
xLeeJYx Posted September 9, 2017 Report Share Posted September 9, 2017 (edited) your if (steamID === 76561198076819824) is the one preventing it to happen Edited September 9, 2017 by xLeeJYx Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.