Over the past week or so, I have been working on re-writing the WarZone Discord Bot.
We had one before, but after a while, the API version got deprecated and the bot stopped working.
The old bot was a bit "meh", but don't get me wrong it was good, but very unstable.
The previous bot was written in C# and had a Lua scripting layer added to it. The idea behind it was that you didn't need to recompile the bot to add functionality to it. You only had to simply create a new Lua file, write your script and restart the bot, job done. And the old bot definitely achieved this, but unfortunately the Lua layer we used, was very unstable and was at the time, the best one available.
So, fast forward about 6 months and the ZeRo show is returning and more people are using Discord to interact with me while I'm on air, and this has prompted me to start a rewrite, along with our newly appointed community manager and requiring these things added.
So, WarZone Bot v2 is a complete rewrite, it uses the latest libraries. I decided to ditch adding any form of Scripting language, it just added time on to development and wasn't really worth it in the long run.
The entire bot is written in C# and everything uses native C#, everything was built using the native Async and Tasks features of the .NET Framework.
The first release has gone out today, it only includes the radio and a few other features at the moment, but there are plans to expand this even further.
So far, this has been implemented:
- Remote Procedure Call Protocol
- Announcements (Announce to all, game night starting, movie night starting)
- User Join/Leave/Ban notifications
- Slackbot type responses
- Cross Server Chat integration
- For admins, send screenshot to Discord functionality.
In the future, I plan to implement:
- Server list integration
- Administration System
- Richer announcements for movie nights/gamenights (Using Embeds)
- Better account linking system.
Remote Procedure Call
So, for those who don't know what RPC is, RPC is our networking protocol of which it allows the Website (And now Discord) to communicate with each other. Example of this includes selling your item on the market and then a notification appears in-game about it being removed from your Inventory, that is RPC.
As the name suggests, you call a function or procedure remotely. That function executes and returns a response. This applies to a lot of things for WarZone, it allows us to push instant radio stats to the game servers (We also implemented this in Discord also!), it's used for Cross Server Chat, so implementing these things in to the Discord bot is very easy as we've already implemented RPC itself, adding procedures and acting upon it is very easy if our RPC library is written correctly.
Anyway, that's it. I don't much else to say about the bot except that it's great and it's only going to become even better.