Kanibot - v1.27.0 Development Updates - Refactored the code and made some interesting changes

in Programming & Dev4 years ago
Authored by @bala41288

For the past one week, I have been working on refactoring the codebase of Kanibot. After making the website up and running, I wanted to refactor the code to increase the performance a little bit. It was a major refactoring and I almost wrote the full code once again. Good thing is that I was able to spot lots of issues in the previous logic and I have corrected it. I will be adding more contract and other notifications in the coming weeks. For those who are hearing about Kanibot for the first time, Kanibot is a notification service for discord users. Please find the website and discord server links below for you to get started.

Website Link: https://kanibot.com/
Discord Server Link: https://discord.gg/S4x6PFz

image.png

Below are some of the key features that I have implemented in this release:

Messages are now being queued and processed

Initially before this version, all the messages were sent then and there and were not queued. When there was too much of load on the messages, there was a high possibility for the messages to get missed. I myself have noticed Kani not sending me some of the notifications. In order to prevent this, I have introduced a queuing feature where the messages are queued and then processed one by one.

There are still lots of optimizations to be done here. I noticed that there was some limitations in Discord libraries where I'm unable to send more than 5 messages per second. The rate limits are set that way. So there is a possibility when the bot is very busy with lots of notifications to be sent, it can get delayed a bit. It doesn't happen all the time but only when more than 200 or 500 messages pushed at a time. But I have made sure that none of the notifications are missed in this process. In the future, I will try to optimize this even further.

Transaction ID and Timestamp

Someone asked me to include the transaction ID and timestamp in the notifications that are being sent by Kani. It was definitely an important addition. People who would like to view the transaction in detail can also click on the link in the message and they will be directed to the transaction json.

image.png

There are still SCOT bot notifications where I have not added this yet. I'm waiting for the SCOT contract to come inside Hive Engine itself so that it makes it a lot more easier to code. Right now there are performance issues and a few challenges in making changes to SCOT bot related notifications.

NFT notifications have been grouped

This had been a long awaited feature. I received many requests from people to get consolidated notifications instead of one notification for every action. I have finally implemented it. Right now I have grouped the notifications to 15 notifications in one single message. If someone is transferring 60 cards to someone, before this update they used to get 60 individual notifications. Now they would be getting only 4 messages. Below is an example of how the message would look like.

image.png

This will be very helpful for people who are doing lots of transfers and market activities in bulk. I guess people like @foxon, @steemshiro etc. can benefit from this feature. No more spam guys or at least better than before. Some would have already switched it off because of the number of messages they get but now it is far better and it can be switched on again if you want.

New NFT notifications have been added

Until this version, Kanibot was capable of sending only the NFT notifications from Rising Star game and dCity game. In this version, I have included the other common NFT notifications as well. If there are transfer, issue or other market activities done on other NFT contracts, Kanibot will track them and send a notification.

image.png

I'm glad to introduce more notifications to Kanibot. Just a few mins before making this post @aggroed published an update saying that tribaldex.com now supports NFT creation. Notifications from all the newly created NFTs going forward will also be automatically included in Kanibot notifications. I have made the code generic to handle that.


Read more about Kani Bot previous releases
Introducing Kani Bot - For Steem Engine notifications on discord
Kani Bot - v1.5.0 update - Feature to subscribe for multiple months
Kani Bot - v1.6.1 update - Feature that sends post payout notifications
Kani Bot - v1.7.1 Update - Introducing NFT notifications and streaming everything from SE sidechain
Kani Bot - v1.8.0 Update - Added Hive Engine notifications to the bot
Kani Bot - v1.10.0 Update - Getting started with splinterlands notifications
Kani Bot - v1.11.0 Update - Market order fill notifications
Kani Bot - v1.12.0 Update - Introducing dCity Notifications
Kani Bot - v1.13.0 Update - Introducing Rising Star Notifications
Introducing a User Interface for Kanibot


Sort:  

Congratulations @kanibot! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

You received more than 100 HP as payout for your posts and comments.
Your next payout target is 250 HP.
The unit is Hive Power equivalent because your rewards can be split into HP and HBD

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

This is soo cool and very helpful.Thank you very much!!

You are welcome. 😀