Mirai Bot 5: Status Report 2

Work on Mirai Bot version 5 continues. Here’s an update of where it’s at.

Core Functionality: Megane

Megane continues to progress towards a stable release. IPC functionality has been greatly improved with many bug fixes and additions such as cluster commands. In it’s current state Megane can be used to run a bot with only minor issues expected.

Core Functionality: Mirai

Work on migrating Mirai to Megane began a few weeks ago. Currently version 5 can handle commands just like v4, but every command must be manually updated to work with the new system. For some commands this is as simple as renaming some things, for others it’s more complicated. Since Mirai has many commands migrating all of them will take a bit of time.

There are still many small parts of Mirai that are missing, such as statuses, stats, and bot list updating which will be added later.

Services: Twitch

With Megane comes the ability (and requirement) to move services to their own process. This comes with the advantage of off-loading the work from the thread handling Discord connections and events. This should result is shards getting disconnected less often and commands getting responses sooner. Obviously this is more complicated, so setting up the first service was a learning experience. Currently the Twitch service is fully functional. It independently updates stream data, handles requests to get data from the API, and tells clusters when to send notifications. The twitch commands are almost done being migrated to use this service.

Next Up

My current plan is to finish up the remaining services first. A Patreon service is needed to handle Patrons. An anime service is needed to send out anime airing notifications. Finally, a service is needed to support the website. Other things like event notifications and music should be fine being distributed, since events are only relevant to a server, and music is mainly handled by Lavalink. I expect some difficulty in migrating the music code, but it shouldn’t take more than a week.

After all the services are done I will start the long and boring process of moving every remaining command over to the new system. Once that’s done only a few small things will remain. Once Mirai v5 gets closer to release I’ll be asking for some help testing everything. With such large changes I expect many things to be broken, so the more people I can get to help test, the faster it will be ready.

For now that’s all. If you want to keep a closer eye on how progress is going, join the official Discord server and watch out for activity in the testing channel.

Owner of Bots on Discord and Mirai Bot for Discord