DEV Community

Brian Dashore
Brian Dashore

Posted on

2020 was a Crazy Year.

My Final Project

I always felt that discord bots never had too much variety. There are so many to choose from, but most of them seem like an all-in-one clone of MEE6, Dyno, etc. I started to get irritated through the constant server outages or the poor admin commands. This is where RoyalGuard was born.

RoyalGuard is a bot made for administration and has unique features such as timed mutes, customizable welcome/leave messages, and welcome roles given on a new user event.

The plan is to deploy this across many servers, so that they can have better administration overall because RoyalGuard is meant for nothing but server administration. There will never be any extra "fun" commands, that is all for another bot of mine that I will work on in Rust.

Demo Link (Bot invite link)

https://discord.com/api/oauth2/authorize?client_id=698554777981681754&permissions=268827894&scope=bot

Link to Code

GitHub logo bdashore3 / RoyalGuard

Administration bot for The King's Castle. Can be used in other server instances.

RoyalGuard

Invite Link: https://discord.com/oauth2/authorize?client_id=698554777981681754&permissions=268827894&scope=bot

Support Server: Since top.gg is re-adding most bots (due to discord limitations), here's the support server link if you have an error/weird issue https://discord.gg/pswt7by

This is a discord bot focused on one thing, Administration. Bots such as MEE6 or Dyno provide an all-in-one experience, but tend to lack on the administrative side of things. I decided to make my own bot that allows server administration as minimal and swift as possible.

Feature List

All commands are within Modules, but here is a list of the features if you're too lazy:

  • Ping: Prints "Pong!". Quick and easy way to see if the bot's online.
  • Bans: Used for banning and unbanning a user. Unbans can either be done by Discord user ID or by mention.
  • Warnings: Formally warns a user in the server. Is considered the lesser form of a ban. After three warnings, the…

How I built it (what's the stack? did I run into issues or discover something new along the way?)

I had little-to no knowledge about the C# library for Discord known as DSharpPlus. However, since I programmed my own twitch bot (KingBot, also located in my Github), I was able to have a base for my C# code that uses DI and EF Core.

I quickly realized that RoyalGuard needed more robust code which made me ask more questions in the C# and DSharpPlus discord servers (Those guys are amazing). From there, I learned about reducing static overuse, hosted services for timers, and the efficiency of an I/O cache for prefixes rather than using EF Core's first-level caching for all queries.

Additional Thoughts / Feelings / Stories

Since the pandemic occurred, it took me a total of three weeks to complete v1.0 which is now pending approval on the Discord Bot List. If I was to have school, the project would have taken two months for v1.0.

C# has a steep learning curve especially when coming from JavaScript. I have grown to love the language since it's really intuitive and there are so many tools at the dev's disposal. I'm starting to find more languages that are more intuitive and have great communities that encourage learning.

Final Notes

I'm going into the medical field as a career starting next year when I attend college and med-school for seven years. However, just because one wants to become a doctor, artist, actor, writer, or anything in between doesn't mean that people cannot have a hobby. I always have the passion to learn something new and apply it to the real world.

Hard work and dedication will get you anywhere.

Thanks to DigitalOcean and the Github student dev pack for giving me the ability to host my bots via a VPS!

Top comments (0)