[SockoBot] Updates to the commands of a steem DiscordBot.

in utopian-io •  7 years ago  (edited)

sockobot.jpg

SockoBot is trying to be the only tool you'll ever need on your server when it comes to steem, while also being easily expandable to anyone that knows a bit of Python.

As per popular request in my community, as well as on utopian, the new update to SockoBot brings some much needed functionality to the belowed $payout command and fixes some stupid inconsistencies in the code.

SockoBot has been seeing much more love lately thanks to @mys, but I have not given up on him yet - not even close. Lately, people in my discord community who test SockoBot every day (thank you, by the way!) have requested that I add more functionalities to the beloved $payout command. One of these requests even made it to utopian, although that specific request will see the light of day in the next update.

Thanks to @mys's helpful bugfix not so long ago, SockoBot will be going through big changes to make the bot faster, more efficient and to prevent freezing. This is the first patch that will work towards that, by refusing to use the steem-python API if not 100% necessary, and by using the api.steemit.com API instead. For the next patch, such change is planned for the authorize() function as well.

The commits for this post can be found here: 1c4254e, 2e2e699, d3bdd86

If you don't believe I'm the owner of this github repo, here's a screenshot for you.

For today, I've got some exciting news for you:

  • Finally added a function to fetch comments (fetch_payouts_by_comments())
    fetchpayoutsbycomments.png

  • Added a new parameter to the $payout command!
    Old: $payout <username>
    New: $payout <username> <days>
    It will now fetch any posts that have yet to pay out in a given amount of time.

  • Improved on $register, which will now store the registered users in a dictionary for potential database usage.
    idkcode.png

  • Updated the comments so the code is properly documented.

The new $payout <username> <days>:

sockobot0501.png

While implementing those changes, I found a small issue in the old way the fetch_payouts_by_blog() function worked, which considerably slowed it down when multiple commands were passed at once. It's now been fixed as well.

github repo
dev's github



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Good Job Fri...

  ·  7 years ago 

Thank you for the contribution. It has been approved.

Thank you for making discord easier to use.

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

Hey @jestemkioskiem 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