You are viewing a single comment's thread from:

RE: So you wanna build a bot from scratch? Part 1: Getting Setup Step by Step

in #steemit6 years ago

steem-js already has bluebird promisified functions. Append Async to any function, e.g. getAccounts becomes getAccountsAsync. Use it within an async function, or with a callback().

Sort:  

Thanks for the tip. I did not know this and unfortunately I didn't see it anywhere in the documentation.
https://github.com/steemit/steem-js/tree/master/doc

However now you mention it I do see it as a dependency in the node_modules directory.
I'm going to keep using promisify because it's working (so far), and I have all the code already written and don't want to have to refactor it. I'll keep it in mind for future projects though.

Thank you so much!

Sadly it's not well documented. I discovered it by chance when someone commented about it. And now I transmit the same tip whenever I can.

Coin Marketplace

STEEM 0.30
TRX 0.11
JST 0.033
BTC 64275.05
ETH 3147.49
USDT 1.00
SBD 4.29