Bimgus
The time I built my own Discord bot for Clash of Clans instead of using one that already exists.

Table of Contents
I've recently gotten into Clash of Clans and, for some reason, I've been made the leader of our clan. To help with logistics, I created a Discord server so we can chat more easily and plan for wars.
I was looking around for Discord bots to help with notifications and summaries related to the clan and member behaviour, but the ones out there were really clunky and didn't work consistently.
So... I made one myself!

This wasn't nearly as involved as when I built this site. All I had to do was
- create the Firebase project I was going to use,
- create some webhooks in Discord for the channels,
- create an e2-micro VM with GCP for a static IPv4 address
- get an API key from https://developer.clashofclans.com/
- get Google Antigravity to do all the work for me
Firebase
The Firebase project is actually called "Clash Bingo" because our Clan name is Bingo. Since I've got an AI Pro account with Google, it just makes the most sense for me to host everything with Google.

Discord
I created all of the channels I wanted the bot to have access to, and then created a webhook for each of those channels.

e2-micro VM
You need a whitelisted IP to use with your Clash of Clans API key, and the cheapest, most stable option for me was a VM on GCP. So far the charges come to $0.02, so I'll keep an eye on it to see how the costs add up throughout the month.


The absolute cheapest option would be my home wifi IP, but that isn't permanent and there is no way I'm creating a new API key and updating code every time it changes.
Clash of Clans API Key
Using my fancy new IPv4 address, I created an API key at https://developer.clashofclans.com/.

Antigravity
Finally, I gave Antigravity all this information and it did all the heavy lifting.

Why Bimgus?
The people spoke, and I listened.

Closing Remarks
This was a lot easier than I thought it would be, and I had a lot of fun with it. So those other Discord bots have no excuse for being as bad as they are.
Shiara Seale
Cat Owner
When I am not reading, managing the Johannesburg Fantasy Book Club, or binge watching documentaries on YouTube, you will probably find me trying my hand at a new hobby or plotting my next move in a turn-based RPG. Or playing tennis.
