sev4a Posted October 4, 2022 Report Posted October 4, 2022 can you tell me the code, I sent a thread to a person, he accepted it, how do I process what he accepted Quote
sev4a Posted October 4, 2022 Author Report Posted October 4, 2022 The question above has been solved How do I make sure that one item is sent to only one user? So that there was no such thing that I sent one item to one, the same one came to the other, and in the end I took only 1 function sendtrade(id) { manager.loadInventory(730, 2, true, (err, inventory) => { if (err) return console.log(`${err}`); if (inventory.length == 0) return console.log("Нечего передавать бро"); console.log("Found %s steam items",inventory.length); const offer = manager.createOffer(id); offer.addMyItem(inventory[0]); offer.setMessage(`Sent By CSGO Bot`); offer.send(function(err, status) { if (err) return console.log(err); if (status == 'pending') { console.log(`Трейд #${offer.id} отправлен, но ждет подтверждения`); community.acceptConfirmationForObject(config.lolka, offer.id, function(err) { if (err) { console.log(err); } else { console.log("Трейд успешно подтвержден"); } }); } else { console.log(`Трейд #${offer.id} отправлен успешно`); } }); }); } Quote
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.