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.tsfile- Will contain most scripts
- Can comment and vote
- First flow set up
- scrape
- write to DB
- comment
- vote
- repeat after 1 minute
A comment looks like the following:
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
Check out the #nowplaying bot in action here
Posted on Utopian.io - Rewarding Open Source Contributors