Gridcoin Wallet Bot Official Announcement - Huge Code Overhaul

in gridcoin •  6 years ago 

5 Late Nights of Programming


Over the past five days I've committed myself totally to the code of the Gridcoin Discord Bot with this being the most programming that I've probably done in my life.

The code overhaul involved moving the code from the mess of regular async discord.py to a more refined and event-driven discord.ext commands discord.py which drastically reduced the code requirements, makes the bot far more resilient and modularises it for adaptability and future changes.

You can find the code on my GitHub repository and you can come see the bot in action and get some free Gridcoin via the Gridcoin Discord server

What is the Gridcoin Wallet bot?


For those who may not know, the Gridcoin wallet bot is a third-party wallet built by me from scratch for the Gridcoin community and allows the user to do more than just deposit and withdraw:

  • Get more Gridcoin: Use the built-in faucet to get started with Gridcoin and build up a balance sufficient for solo crunching.

  • Micro-tipping: Tip others or donate your Gridcoin, it doesn't matter how small the contribution is.

  • Rain: Rain Gridcoins onto other users.

  • Read FAQ answers

  • Generate QR codes on the fly

  • Explore blocks on the chain

Notable Changes


SQL Galore!

I've been becoming ever-more interested in databasing and so I've made it so the bot operates entirely from physical tables without having to worry about a temporary cache of users. As you can see from above, I've gone mad with SQL queries to make this stuff easier to program and modularise.

The advantage of this is that we get more reliability and resilience to disruption. For example, if my servers go down from a power outage, everything is synced so I have peace-of mind that there won't be any data lost from a cache.

However after some testing, I've noticed that this approach is slightly slower compared to the old implementation using a database of sorts held in primary memory. But after all it could just be my slow drives on my testing machine, who knows.

Lower Data Impact

As you can see, the old style of messages was a huge mess and did a lot of work at cluttering the channel. But I've changed that so that I save data and become less of a burden to the Discord servers. Here are the changes:

A lot cleaner I'd say!

Tipping and Raining in All Channels

As per Nethlek's request, I have implemented certain commands to be executed in all channels while keeping faucet and help-related messages to a particular assigned channel. This is to keep the chats clean while also making generous functionality accessible in all channels.

As you can see, he is quite excited about these changes.

Future Outlook


I plan for only small changes to the information and commands for the current bot but I have big plans for future expansion, starting with Pinkcoin

Provided that the Pinkcoin client is much like the Gridcoin client in terms of RPC commands and that the Pinkcoin server has gone without a bot for months, I thought I'd help out and give them a bot too. So over the next week I should have that up and running over on their Pinkcoin Discord server.

Conclusion


It been a rough and fun couple of weeks for me, and I'm glad to be apart of the Gridcoin community, you guys always have my back. I just wanted to thank you all for the contributions you've made and generosity provided, and I hope I can give that back through my own contributions.

I wanted to give a special few mentions to the following people who helped out in the development and testing process:


Gridcoin Discord | BOINC OS | GitHub | [email protected]

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:  

Excellent work as always, @delta1512. Thanks for everything you do for Gridcoin <3

Hay man we love the time ,thought ,effort & work you have put into ( and will put into ) the discord bonus bot! Awesome it wasn't & isn't a one and done and that you strive to make it even better vs " here is my bot " such as sql ( sql hates me i can try a command using mysql or even marianadb and it will error & someone else pastes & its kosher ) and having the interest in db coding and obviously python. I want to make a new irc bot using eggdrop and tcl , i already have a reverse shell cli pass threw bot to run bash commands for network tools and commands like dig , whois and many more where gridcoinresearchd can be replaced BUT its the database side that has me just like you mentioned not using a temp db cache .. But your bot inspires me and I know I say all the bots , ate not only appreciated and faucets and websites are value added Gridcoin assets , its true. You help not only new users start out but you draw them in and help community growth.. Thank you.

Thanks, we're all here to help each other and make this community great!

If you need any help with databasing, just ping me in the Gridcoin Discord, I should be able to help you out.