Fix a nasty bug inside of a STEEM Discord Bot [20 steem bounty]

in #utopian-io7 years ago (edited)

Just today I have created SockoBot for a polish discord community I will be building and opened it up to the open source community.
github
dev's github profile

payout.PNG

Mind that currently all strings in the code are in polish, although comments and variables are in english. That's because I plan to deploy this to my polish community first. The bot will be translated to english when it's ready for a official launch.
The bot has now been translated to english.

What is SockoBot?

SockoBot is a steem related Discord bot that handles functionality that every steem related discord channel might want to have. The full contribution post including the full documentation will be posted soon, when I finish adding it new functionality and translating it to english. For now, you can read the readme file if you want to know more about it.

The bug in question.

One of the functions of SockoBot is fetching all posts that have yet to pay out and calculate their value in USD. This works on users with 0 posts, users with dozens of posts and users with crazy high payouts. For some reason though, it doesn't work on people with really high reputation in the community, like @gtg or @jesta. This seems to be the case for most top witnesses, but pretty much no one else.

The bug is easy to reproduce, but it throws dozens of errors at you every time it occurs, not to mention that it will freeze the bot and not crash it, so you need to manually shut it down every time. I have yet to find a solution for this. For whoever creates a proper fix to this issue I offer 20 steem and an 100% upvote on the contribution post on utopian-io.

Other fixes are welcome and are sure to be accepted as contributions on steem as well. Depending on how nasty the bug was and how hard it was to fix, it might even reward a bounty.

Rules:

All contributions are to be deployed as pull requests to the linked github repository. They have to be documented properly in the commit message. For questions about my messy code, contact me at @jestemkioskiem on steemit.chat or Vctr#5566 on Discord.
Only bugfixes that don't create other obvious bugs will be accepted and receive the bounty. The bounty will be paid to the best contribution, or to the first one if no one responds with a different one in 24h.

Edit: It appears that the fix might be to multithread and put the discord and steem functionaly into seperate files. If anyone is willing to do that, you're welcome to do so and you'll receive full recognition for it.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Okay-- I've been looking for something to do on Steemit. Maybe this is my calling. I friggin' love Python. Never done anything with Discord though, so someone else might get to it first.

I'll let you know when I get it working.

Cool, thank you! Contact me on discord if you need any help (Jestemkioskiem#5566)

Approved.

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

Coin Marketplace

STEEM 0.19
TRX 0.14
JST 0.030
BTC 59737.47
ETH 3186.24
USDT 1.00
SBD 2.43