A few days ago I was playing Star Citizen and in the middle of a “bunker delivery” mission. For these, I have to travel to a planetary location, infiltrate an underground bunker, and find three crates. While there, I need to help the lawful NPCs defeat the unlawful NPCs who are occasionally invading. Once I get the three boxes (and have taken out the bad guys and/or avoided combat entirely), I need to deliver them by ship to the drop off destination. During this one particular mission in which I was tasked with delivering three boxes, I had gotten box number 2 all the way to the drop-off machine (into which I place the box, where it will get sucked into the aether like those bank drive-through vacuum tubes of old) when some asshat popped up beside me and stole the box from the machine. Considering I was in an armistice zone — no guns, no punching, no knifing, no overdosing with the medical gun — there was pretty much nothing I could do to get the box back.

I mentioned this in my org’s Discord channel:

This was a popular idea:

We really ARE a lawful org…

We’re currently working (very slowly) on an org website and suite of the usual tools for use in Star Citizen, and while this kind of tracker sounds like a good addition to such an app, I thought that it couldn’t be that difficult to create a Discord bot that could handle the task. Turns out it really wasn’t all that hard.

Building a Discord Bot is a pretty low-level task that’s good for folks who want to learn Javascript development against Nodejs. Using the DiscordJS library to abstract away all of the bare-metal Discord concepts makes building your bot a breeze.

In the next few posts, I’ll break down my project for those who might be interested, and so next time I set about botsmithing I’ll have something to refer to myself.

What Does This Bot Do?

KTFBot — or “Kill That F**ker” Bot — allows users to register a “target” into the database. Any user can then log a “kill” versus that target. With every kill (because for some, lessons are never learned the first, second, or tenth time), a bounty hunter’s tally is incremented. Users can list targets in the database, and can view the top three hunters per target, or overall.

the “/ktf” command takes a second subcommand that tells the bot what to do. Some commands take a third, free-form text parameter, usually the name of a target.

Adding a target
Registering a kill against a target
Various leaderboards

In the first development post, I’ll go over the setup of the development environment: the installation of NodeJS, Firebase’s Cloud Firestore for data retention, the libraries in use, and options for where to develop.


Owner and author.

Leave a Reply

Your email address will not be published. Required fields are marked *