neverhood Posted July 2, 2018 Report Share Posted July 2, 2018 Hello, I'm using card bot (lvl up bot) with public source codeeverything is working fine, but I want to do this bot more effective this bot using: community.startConfirmationChecker(10000, CONFIG.IDENTITYSECRET); and I don't like this method, I trying to use acceptConfirmationForObject, but I think I'm doing something wrong community.on("newConfirmation", (CONF) => { console.log("## New confirmation."); community.acceptConfirmationForObject(CONFIG.IDENTITYSECRET, CONF.id); });because if I remove "community.startConfirmationChecker" my trades are not acceptedwhen I use: "community.on("newConfirmation", (CONF) => {" I don't even see console logs with "console.log("## New confirmation.");" did I do something wrong?I want to remove startConfirmationChecker and using only acceptConfirmationForObject Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted July 2, 2018 Report Share Posted July 2, 2018 The object ID should be your trade offer ID, not the confirmation ID. You shouldn't use the newConfirmation event at all anymore. Quote Link to comment Share on other sites More sharing options...
neverhood Posted July 2, 2018 Author Report Share Posted July 2, 2018 oh I get it now, thank you if (status == 'pending') { // We need to confirm it console.log(`Offer #${offer.id} sent, but requires confirmation`); community.acceptConfirmationForObject(config.identitySecret, offer.id, function(err) { if (err) { console.log(err); } else { console.log("Offer confirmed"); } }); } else { console.log(`Offer #${offer.id} sent successfully`); } used this and works good! Dr. McKay 1 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.