You are viewing a single comment's thread from:

RE: 10 SBD SteemJS Programming Question

in #steemjs8 years ago

Sorry if I'm late to the party. I am doing the inverse of what you're looking for.

https://github.com/r351574nc3/steem-bot-examples/blob/0f2867fd3f80c0c30f0271c05071d5c41363408a/auto-reply-steem-bot/app/helpers/bot/reply.js#L118

My example uses getDiscussionsByBlog to retrieve blog entries. I only wanted my unique entries, but the results were returning resteems.

I ended up writing this to filter out resteems

https://github.com/r351574nc3/steem-bot-examples/blob/0f2867fd3f80c0c30f0271c05071d5c41363408a/auto-reply-steem-bot/app/helpers/bot/reply.js#L41

If results.id == 0, that means it's a resteem. I used the inverted condition to filter those out. Hope this helps. You can run this periodically.

Coin Marketplace

STEEM 0.09
TRX 0.30
JST 0.035
BTC 110813.12
ETH 3918.73
USDT 1.00
SBD 0.58