Broadcasting Comments and Votes

in #utopian-io8 years ago (edited)

New Features

This pull request includes a voting and commenting function

// votes at a default of 100%
vote(post: Post, votingPower: number = 100)

// the comment-body is currently static and therefore not a variable
comment(post: Post)

These are simply wrappers around the steem package, but they abstract a lot of the information such as the account performing the action. The username and password are passed through as environment variables.

  • Introduction of the bot.ts file
    • Will contain most scripts
    • Can comment and vote
  • First flow set up
    1. scrape
    2. write to DB
    3. comment
    4. vote
    5. repeat after 1 minute

A comment looks like the following:
image

The APIs for comment and vote are quite simple, leaving most of the details of the user to environment variables STEEM_USERNAME and STEEM_PASSWORD.

vote(post: Post, votingPower: number = 100)
Post = { author, permlink, votes }
This votes on the given post at a variable votingPower which defaults to 100%. Errors will be thrown if unable to vote. Causes of this are voting more than once every 3 seconds and voting with too small of a voting power.

comment(post: Post)
This function will comment on the given post. The comment is currently static and the same comment is used for all posts. Plans are to have this be an input file, so different comments can be created for different occasions.

Now Playing

image.png

Check out the #nowplaying bot in action here



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

How can we pres elect a topic and make an auto comment for a selected post? Would it be possible? @walnut1

That is coming soon! I will start with the option to simply pick a tag and like/comment on everything in that tag. That should be within ~3 iterations. Then I'll extrapolate on that and only like/comment on things if they pass certain criteria such as containing a certain thing in the title or in the body or if posted by a whitelisted user.

Please add suggestions according to your use case. I am planning on releasing a roadmap some time soon once I know what all my end goals are.

Thank you for doing the extra miles to make steem more easy to use. I will be following for more developments.

Thank you for the contribution. It has been approved.

Please make your future contribution more descriptive.

You can contact us on Discord.
[utopian-moderator]

Hey @walnut1 I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.05
TRX 0.33
JST 0.080
BTC 62600.41
ETH 1629.61
USDT 1.00
SBD 0.40