Gridcoin Discord Bot Update: Code refactoring and new features

in #gridcoin6 years ago

Welcome to yet another one of my developer updates, this time I will be showcasing the recent changes to the Gridcoin Discord bot that I have made and am operating for the community. There have been large code refactors but I am happy to show off some of the new features and I hope you enjoy.

Currently the bot has about 70 users and the faucet is serving them gladly, but might need some topping up soon. You can find the full source code for the bot here and if you would like to know how to get started, you can find my announcement with instructions here.

Code Refactoring


It has been pointed out by jorkermc that the program that runs the bot should be completely asynchronous to prevent any blocking problems typically encountered by high-traffic applications. This is essential for the scalability of the bot as more users access this facility and I have solved this problem by massively refactoring the code over to Python's asyncio module which took about a week (and lot's of soft drinks) to get running fully.

QR Codes


I had the idea that it would be intuitive for the bot to generate QR codes on the fly - and so it does! If you just use the command without any text, it will give you your address for deposits on the bot, else it will encode whatever text you give it (ask @barton26 if you don't believe me).

I've made the QR codes a nice purple to match the theme of Gridcoin too, you can check this out below when I talk about the faucet.

Prices


The bot has an in-built module that can handle the fetching of prices for Gridcoin thanks to CoinMarketCap. This currently only supports the reporting of your total holdings and simple GRC-USD comparison as shown.

It will be considered in the future whether to have full pricing functionality as there are a plethora of bots out there doing that already, with a few to name in the Gridcoin chat.

Faucet


The faucet is still running strong and now has an indicator of the amount of time left so that users can have a better idea of when it is next available. For the next 3 days I will half the time limit on faucet requests to just 12 hours as a celebration of this achievement, so make sure you join us and get your hands on some Gridcoin!

You can donate to the faucet and help out some new users by donating to the following address: SFJdw5kVzWyKapsJWgKX3UeLxrHF6To347

Conclusion


I hope that this is a worthy utility for the community and that I can help out more new users by providing an easy means of getting into Gridcoin. I have spent many hours on this work and host this entire thing myself so I would highly appreciate any donations, Steemit mainly covers that for me, you guys are very generous!

I have also pledged to recycle a portion of my earnings from withdrawals to either organisations on the donors list or the faucet itself.

Have a great day and happy crunching!


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

Sort:  

That's one bot I enjoy using :-) I also learned a lot thinking and chatting about concepts like "dust attack". Hopefully I can contribute more in the future.

Thank you for your support, I'll keep in touch!

The qr code command is amazing. There's now no need to use a qr code generator website you can just this bot!

I used a portion of my earning on Steemit to buy some GRC. Two thirds went to the bot's faucet (200 GRC) and the remaining 100 GRC went to my bot's wallet address for the purpose of tipping new users and paying off developer bounties/incentivisations for the bot.

You guys are the best! Happy Crunching!

Coin Marketplace

STEEM 0.15
TRX 0.12
JST 0.026
BTC 57014.79
ETH 2478.23
USDT 1.00
SBD 2.29