During a week, I developed a discord bot to participate into the Discord Hack Week 2019.
Discord Hack Week Banner
During the first day, I created the Github Repository and its basics. Then I started researching for actual good moderation bots, just to annotate some ideas an get inspiration.
Mee6 moderation properities
Dyno moderation properities
The second day I had the bot working and some basic functionalities, such as saying Hello World and beeing active. The problem is that I had to host it via terminal, and that made me to have my laptop turned on.
Then, I discovered that I could host the bot via Glitch, but nowadays this trick is not working anymore since they updated their platform to avoid bot hosting.
The key was to host a web with expressjs and the bot connected to discord.js. After that, I could have the bot 24/7 up with an external tool that was sending http requests to the "express web". Note that in those days, they didn't have any premium plan to keep projects alive for all the day long, so this was the only way to do it though.
Hammer Bot Logo
At the end of the week, the bot was capable of welcoming new users, do actions for bad behabiours such as kick, ban, warn them and also had a blacklist of +100 swear words. The warn option (warning) is an action that at the count of 3 you get kicked. This function was the hardest to code, because it was using SQLite on node.js with SQL statements. All the commands list are available here.
I've to add that I created my own system to save userIDs that had accepted the server rules. (An admin saves the rules previously) and every time a new user joins the server, the bot asks to accept the rules.
At the end, I didn't win the competition but I passed a great week developing and discovering discord's API. And this is the story of how I got a discord bot verified by discord.
If you find a bug please report it and I will fix it, take in mind that this bot was developed on 2019 and time has passed since there, (nodejs has changed, and discord API too)
Finally, here're some links that may interest you to visit for more information: