Comments (28)
@andrewda fack I've completely titled this question wrong -.- not slept enough
from node-steam-parentbot.
Well the code you supplied certainly won't accept trades automatically, you're just initializing the child bot. I can try to whip you up something really basic in a couple minutes that you can then work off of. Basically, you'll need to initialize a tradeoffers instance and listen for the new offer event.
from node-steam-parentbot.
@andrewda no need, I already have that code ready. What do I need inside the event to activate accepting?
from node-steam-parentbot.
Checkout the acceptOffer()
method.
https://github.com/Alex7Kom/node-steam-tradeoffers#acceptofferoptions-callback
from node-steam-parentbot.
acceptOffer that was sent to you.
I'm sending the offer not receiving it. @andrewda
from node-steam-parentbot.
What do I need inside the event to activate accepting?
What are you trying to accept, then?
from node-steam-parentbot.
@andrewda I'm trying to automatically confirm trade offers that im sending.
from node-steam-parentbot.
@andrewda updated the message in the original question.
from node-steam-parentbot.
Ahh, I see now. You'll need to use a steamCommunity
instance and use startConfirmationChecker(pollInterval[, identitySecret])
. That will check to see if there are any new confirmations and, if there are, confirm them. Note that you'll also have to setCookies(cookies)
.
from node-steam-parentbot.
@andrewda any chance you can whip up an example of how to setup Cookies and in what context this should be done?
from node-steam-parentbot.
@andrewda why does setCookies(cookies) have to be used?
from node-steam-parentbot.
setCookies() is needed to "login" to steamCommunity, which is a separate module from the one you're logging in with.
from node-steam-parentbot.
@andrewda how do I parse the login information into that then?
from node-steam-parentbot.
@andrewda https://github.com/DoctorMcKay/node-steamcommunity/wiki/SteamCommunity#setcookiescookies doesn't seem to give too much info about what I need to parse? I'm just a little confused sorry! Thanks for the help 👍
from node-steam-parentbot.
Using a steamWeblogon
instance. It just needs to be an array of cookies.
from node-steam-parentbot.
@andrewda is there an instance created when creating an instance of parentbot or do I need to create a separate instance?
from node-steam-parentbot.
If I'm not mistaken, you'll have to make a new instance of every module you plan to use in your app.
The setCookies()
method should be used once you're completely logged into Steam.
from node-steam-parentbot.
@andrewda I thought that a steamWeblogin is created through steam-parentbot: steamWebLogon - an instance of SteamWebLogon (use this for logging into Steam web, replacement for steamClient.on('webSessionID');
from node-steam-parentbot.
@andrewda so surely you can do something like: setCookies(bot.steamWebLogon)
from node-steam-parentbot.
//your login stuff here
Bot.steamClient.on('logOnResponse', function(logonResp) {
Bot.steamWebLogon.webLogOn(function(webSessionID, cookies) {
Bot.steamCommunity.setCookies(cookies);
Bot.steamCommunity.startConfirmationChecker(10000, identity_secret);
});
});
that should be all you need to get started
from node-steam-parentbot.
@andrewda you already added the confirmation checker in this pr, I think he's saying it doesn't work? I think my bots have also been having problems with this, but I'm not sure.
I have no idea how to do any of this stuff so I can't help much.
from node-steam-parentbot.
I completely forgot about that, @dragonbanshee! I'll try and debug this issue now, @CodeLuca, sorry about that.
from node-steam-parentbot.
@dragonbanshee @CodeLuca #19 fixed the problem for me in my tests!
from node-steam-parentbot.
Ok it's on npm as version 2.2.5.
from node-steam-parentbot.
@andrewda will the code that you wrote earlier in this issue work then?
from node-steam-parentbot.
@andrewda @dragonbanshee still not working for me even with newest version of the module... I'm getting this warning if it helps anyone? warn: [tripleskinsbot] Already have 2FA enabled
from node-steam-parentbot.
@andrewda @dragonbanshee also started the confirmation checker manually, and still nothing :/
from node-steam-parentbot.
Got it to work! Thanks for the help everyone!
from node-steam-parentbot.
Related Issues (20)
- How to generate HOT 6
- Handling sended offers :) HOT 2
- Wont connect to socket HOT 26
- What is an identity secret? HOT 27
- Why steam is not working HOT 2
- How to get .2fa_info files. HOT 3
- Offer sending failure HOT 4
- Problem with hold duration! HOT 3
- I'm getting unexpected disconnection all the time HOT 6
- IS IT INCLUDE MANAGER? HOT 2
- How to get data on weblogon? HOT 1
- How can I reconnect from steamweblogon programmatically? HOT 3
- Handling Offers HOT 2
- Recent issue with NodeJS reinstall HOT 10
- [Q] Worth changing to ES6 version? HOT 1
- steamCommunity instance is 'community'? HOT 9
- Limit numbers of cSteamGroup.getGroupMembers() returns HOT 4
- smsCode HOT 30
- Array of bots and handlers HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-steam-parentbot.