I just wanted to share what i’ve been working on for the past few weeks and the ‘issue’ im seeing with a bunch of current bots.
Here’s a bunch of info that i was testing today/yesterday(i was informed this is INACCUREATE)
Moobot: [1006, 869, 1011, 769, 799, 789, 961] = mean:886ms
Nightbot: [950, 876, 1002, 1008, 788, 766, 789] = mean:882ms
StreamLabsBot: [1131, 1004, 1102, 894, 751, 799, 978] = mean:951ms
Leviathan: [681, 412, 512, 551, 671, 413, 409] = mean:521ms```
Above are the results of each time i called commands that would normally require API calls on the bots cited.
On avarage(inaccurate):
Moobot had an avarage of 886 ms per command
Nightbot had an avarage of 882 ms per command
StreamLabs had an avarage of 951 ms per command
Levitathan(mine) had an avarage of 521 ms per command
As you can see, there’s quite a bit of difference in delay from what i’ve gathered so far.
The highest ping (681ms) barely matches the next lowest ping(Streamlabs 751ms), this is all thanks to Caching.
What im trying to accomplish is to increase the threshold of the Twitch bots with some competition and some results in order to improve the overall quality of bots in the platform.
I’ve personally come from Discord, a platform that encourages and rewards developers to populate their platform with bots to aids the users have an overall better experience, with badges and some other perks.
While those big bots might encounter some big issues with caching, im suggesting the following:
On twitch’s side:
Add Sharing/clustering on your api, that would allow for each node/process to run
individually while taking care of an x amount of streams. This would greatly increase
functionality of bigger bots as their processes can be split and not require a single core to
be running every single channel/stream its working on.
Reward bot devs depending on their accomplishments and what they have to offer to the
overall community of twitch. This would help create competition on twitch bots, which is
this
case can be used advantageously, without competition, bots are bound to stale, which
decreased the overtime satisfaction. By adding competition, you force devs to push their
content to newer grounds in order to deliver better and more optimized content to the end
user.
Take the previous test that i mentioned as an example, the fact that a nobody dev came and managed to beat some of the most popular bots in terms of response time shows something.
As i mentioned, big bots MIGHT NOT BE ABLE TO ADD CACHING due to the sheer amount of streams they are present in, this would require quite a beefy server with a unglodly amount
of ram(my current host specs: 2x E5-2670 0 @ 2.60Ghz, 128 GiB RAM, 29 IP block(9 Ips, 5 usable) IP4, 2x 960GB Disk, 1 Gbit bandwidth, OCS - Ubuntu 18.04(Bionic)
).
While this holds true for professional bot developers, most normal users wont be able to get this much out of their rig. What im recommending is a somewhat good and healthy competition between big bot devs looking to improve the overall quality of bots, be it in dashboards, user functionality, or an overall improvement over its competitors.
Currently, i just wanted to share my thoughts on what Twitch CAN do to increase their bots capabilities to expand its horizon and work alongside with the devs to provide a much better user experience overall.
Suggestions:
1) Image CND that renders on the client/ render links from verified bots onto client.
While this may be far fetched, coming from Discord this has been the number 1 feature that i’ve missed.
With image manipulation libraries such as Canvas, this opens up a TON of doors for bot development, specially for custom leveling systems with cards. I’d highly recommend looking into THIS (not sponsored) as a reference for what im talking about.
With this, you’d certainly increase the chat activity to newer grounds, enticing and promoting users to chat as they level up. (this is currently possible and midway implemented in my bot) This encourages users to interact with chat more often than ever as they get rewarded for chatting with some decent visuals(no user likes poorly designed image, thats specially true as to why users request dashboards more often than raw commands, its user friendly)
2)Reward devs with badges/emotes or other way.
This has been one huge good step on Discord’s part, they have been encouraging developers to create bots in exchange of badges for their platform. As a business, this brings a great advantage in terms of functionality as you can use those to advertise and promote your platform. Read this for more info.
In rewarding devs, you also increase the amount of bots in your platform. This is a dual edge sword, in one hand this overpopulates the platform, in a way that ‘basic’ bots are only looking for the rewards. On the other end, this creates competition amongst bot devs to create the ‘better bot’. Nowadays, this is the forumula: Small streamers: Chatbot/moonbot/streamlabs/automod
Bigger streamers: Chat/MoonBot/StreamLabsBot/Automod + 1 or 2 Custom Bots.
From what ive gathered so far, theres only custom bots made PER streamer, theres no competition whatsoever, those are paid bots that work specifically on the streamers end with WHAT THEY WANT.
3) Add a unified/twitch bot list.
A place where devs can advertise their own bots in a way thats fair to everyone. This also opens up market opportunities for investors: lemme develop a bit more on this. Imagine something along the lines of this. This is a website that works by allowing ANY bot developer to add its bots onto its website for it to be added by users that search for something related to what it does. This brings Ads spots, where ADVERTISEMENT spots are MARKED and available for bigger bots to compete with. This brings 2 new things into the platform: A Unified front where the user can search for bots freely and easily and a place for investor to pick in as a business opportunity(with paid features and shares). If done correctly, twitch is granted be able to take advantage of this.
4) More Roles/Permissions
. Roles currently are able to being set per bot, though this brings quite a few problems. 1. Theres no mid way between a USER and a MOD. Thing complicated things with only being able to set VIP as a mid way between the 2. With ROLES you are able to much more freely customize what each user can do and what not. While i do have plenty of example on hand, i’d rather leave this in the hands of twitch to test and check if its a worthy implementation.(In my opinion, having only 4 main roles is quite lacking for such a big platform, those being = USER, VIP, MOD, STREAMER). As a developer perspective, having only 4 mods grants us plenty of doors to access, though it limits quite big the amount of accessibility we can give rto our ‘normal’ users. Patreons, Subs, Normal Users, Common Users, those can barely be distinguished between eachother with only a single role assigned.
Final Thoughts: Most of the experience im bringing in this is due to Discord, and while it may be a big TLDR and being a completely different platform than Discord, in the hopes of a better end user experience i hope for a good change in the community that welcomes the developers bringing in more content for their average users.
TL;DR
- Add images to the IRC chat, this opens up plenty of doors for bot developers.
- Reward Devs more, devs have no purpose to develop bots, which stales competition.
- Unified place for streamers to search for bots.
- Increase in Roles. This brings up a lot of doors for bot developers to add ranks/roles to their users.
For reference of those results, this was the method used to calculate each of those results
Command fired by the bot, the counter works the moment the request is sent
console.time('command')
chat.send(message.channel, !uptime/!other commands);
collector.on('message recieved' => (filter = message.username === 'the bot that was
being tested'));
console.timeEnd('command')
After thoughts.
While im creating a library cache, im still working along side with the twich-js development team to bring big bots to the development field. Im currently testing my library cache to make sure it works fine with at LEAST 10,000 streams within a 7 day period with a standardized stable RAM usage without leaks. This should bring a decrease in API calls while also allowing bots to develop their commands much more dynamically as they wont have to rely on the API to provide most of the information needed.
For those who read most/all of it, i bid you a great day that and let us work together to improve the Twitch Developer Community!