Jump to content
McKay Development

How to set separate commands for certain steam users


Lonster_Mosnter

Recommended Posts

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

Link to comment
Share on other sites

I got it i used

if (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.message
community.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. ');
}
}
})
}

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