@Checky 0.3.2 - Upvotes, Comment Deletion and More !
Last time I said that there wouldn't be anymore update post for @checky since I didn't know what more could be done. However, a few good suggestions on my last post ended up keeping me busy with this bot for two more weeks. The mention checking aspect of @checky has barely changed as you will see in this post, this update is more focused on @checky's comments and on its voting power. In the last post, I mentioned that I wanted to change the way deleted characters are displayed. However, after testing a few ways to display those, including the ways talked about previously, I decided to stick with not displaying deleted characters at all since all the ways tested were more confusing than anything. Anyway, you may be wondering why a bot that checks mentions has "upvotes" in its title so let's get right into that topic !
Upvoting corrected mentions
The problem with Resource Credits in their current state is that it isn't yet possible to delegate them directly to an account except by delegating Steem Power. This essentially means that I had no other choice than to delegate 500SP to @checky for it to not be limited by its Resource Credits. However, that also meant that those 500SP weren't used to vote posts and therefore were a waste of Steem Power (at least that's how I see it). In order to fix that problem, I decided to follow the suggestion of @mineopoly and start upvoting posts that got their mentions corrected at most one day after @checky's comment. A random aspect has been added to the upvotes to prevent users from gaming the system. Posts are rechecked one day after @checky's comment and added to a list of upvote candidates if they don't contain wrong mentions anymore. Every 2 hours and 40 minutes, a candidate is picked at random in the candidates list and upvoted by @checky. Once the upvote is confirmed to have been broadcasted, all the candidates for that upvote are removed from the list. An additional entry to the list is given to authors that upvoted @checky's comment on their post (as long as they also corrected their post) to thank them for financially supporting @checky. Following that logic, authors flagging @checky's comments will not be added to the upvote candidates no matter what. Since @checky relies on @fullnodeupdate's service to get a list of working nodes, one of its daily upvotes is used on @fullnodeupdate's daily post, hence why it upvotes 9 candidates a day instead of 10. (pull request)
Deleting and editing comments
Some of you may have already realized but @checky started deleting its comments about a week ago, this was already talked about in the last update post but at that time I had no clue how I was going to make @checky delete its comments. I ended up opting for automating the comment deletion without requiring any input from authors. Just like for upvotes, posts are rechecked one day after @checky's comment. If the mentions in the post have been corrected, @checky will try to delete its comment. As you may already know, comments can't be deleted if they have any reply or vote attached to them. For this reason, comments that can't be deleted get changed to a message thanking the authors for their quick reaction to @checky's comment. If the mentions haven't been corrected after one day, @checky will leave its comment for 5 more days before deleting it no matter what (as long as it can be deleted). (pull request)
Changing the mention checker case sensitivity
On the last post, a comment from @richatvns showed me why making the bot case sensitive for everyone without users being able to change its sensitivity was not a good idea. Thanks to this feedback, I decided to re-introduce case insensitivity but to make it optional by adding a command to the bot. This command is
!case [sensitive-insensitive], sensitive being the default behavior (only lowercase mentions) and insensitive being the old behavior (mixed case mentions). Be aware however that the whole reason I decided to make the bot case sensitive in the last update was because it mostly had usernames from other social networks in the supposedly wrong mentions it found (despite all the checks that are in place to prevent that as much as possible from happening). (pull request)
While they haven't improved that much, suggestions should now be a bit preciser than before thanks to a few changes. The bot now checks if any of its generated usernames happens to be the username of someone following you or being followed by you. Talking about users that are in your follow circle is a regular thing on Steem and it's pretty common to make typos in such posts. The other change is more of a fix than anything. Before, the first generated username found in the author's mentions would be suggested to the author. I only realized how dumb this was a few days ago when it suggested to someone to replace @andarchy by @anarchy instead of @andrarchy. Now, the most occurrent generated username found in the author's mentions is suggested. The same goes for the suggestions found in the author's followers and followees. (pull request - commit 1 - commit 2 - commit 3)
Automatically powering up rewards
In order to avoid doing it manually, I decided to automate the whole process of turning @checky's author and curation rewards into Steem Power. Every 3 hours, the bot now claims its rewards and powers its Steem balance up. Then it either converts its SBD balance to Steem or attempts to buy Steem from the market (the order is cancelled after 10 minutes) depending on which option is the most profitable. Choosing between converting and using the market barely saves anything nowadays but it definitely will if the SBD price ever goes crazy again. (pull request)
- Made the post rechecker and the upvoter's states crash-safe. (pull request)
- Created a steemer module for all interactions with Steem. (commit)
- Made use of the async/await syntax in the code. (commit)
- Fixed the bot not checking mentions in its replies made by advanced users. (commit)
- Added Smoke.io to the social networks regular expression.
What's coming next ?
Nothing, at least as far as update posts go this one was definitely the last. I just feel like there now is truly nothing left to do to improve @checky. I will obviously still make updates to @checky's code if bugs need to be fixed but that's pretty much it. @Checky just got to a reputation of 48 a few hours ago and while I'm aware that reputation doesn't mean much anymore it still shows that this bot is liked by most of this community. So once again, thank you all for the support you give @checky everyday. The profile picture contest I promised in the next post will happen as soon as @checky gets to a reputation of 50, hopefully it won't take too long. Well, that's it ! Time to stop looking at @checky's activity every hour and start working on a bigger project !
If you want to contribute to this project or talk about an issue it has, feel free to visit its GitHub page. You can also clone it and follow the instructions written there to get it running (although not recommended since @checky already runs the script). My social medias are listed at the end of the README file. If you add me on Steam, tell me the reason why on my wall, otherwise I won't accept your friend request.