Jump to content
McKay Development

Bot don't send messages first


Igaresha

Recommended Posts

Hello guys, i've got a problem which my brain cant solve :( 

Bot should send message to admin (via steam chat) after accepting trade offer (for example), but he dont do it.. 

Thats my not working code: 

manager.on('newOffer', (offer) => {
    if (offer.itemsToGive.length === 0) {
        offer.accept((err, status) => {
            if (err) {
                console.log(err);
            } else {
                console.log(`[!]Trade Accepted! Status: ${status}.`);	
		client.chatMessage(76561198074539527, 'Trade accepted! Check bot's inventory!'); 
            }
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...