Discord Bots for Pokémon GO

08 Aug 2019

If you’re anything like me, the summer of 2016 meant the summer of Pokémon GO, where everywhere you turned it seemed like there wasn’t anyone not playing this nostalgic augmented reality game of catching fake little monsters from your phone. You played too, because, well, everyone was doing it and the Pokémon World was kind of better than the real one. However, unlike me, you probably stopped playing a few months later once the initial hype wore off. For the past 2 years (starting around the beginning of 2017), I’ve been one of the lead moderators for the Chicago Pokémon GO Discord server and helped it grow from a handful of players up to 9,000 members today. This “job” has included all kinds of work including event planning, writing, creating a website with merch, and countless hours moderating chat and helping newcomers. The biggest and best part of this job, though, has been developing bots to help moderate, answer repetitive questions so that we don’t have to tell people the same thing over and over again, and provide information to users including Pokémon typing and stats, comparisons between ‘mons of different stats, a leaderboard for the competitive folks, and links to the server/website/etc…

“What’s a Discord bot?” you may ask. Well, think of Discord as the modern Ventrilo-meets-Skype-meets-Slack-for-gamers where you have a server that acts as a home for your gaming community, complete with text chat and voice chat and lovely new organization options like channel categories and server folders. Discord has a great open-source API, which means developers can create bots for their communities that can do essentially whatever the developer can dream up: play games against an AI, make polls, make sure users aren’t breaking your rules, spit out random quotes from your favorite TV shows…

Anyway, here’s Botty - he started out in 2017 as a pet project to do something that other people had done, but better (that something being a very basic bot that gives you Pokédex information). When I first wrote it, the code was sloppy and inefficient but got the job done. Since then, Botty has taught me as much as any programming class I’ve taken - some things I’ve learned along this journey include web scraping (when it’s allowed and when it’s not, and how to discuss this with the website owners); working with unique APIs to integrate with different platforms; writing clean, easy-to-read code with portable classes and functions that could be used by anyone; deploying apps/bots through cloud services rather than my desktop computer so I don’t wake up to dozens of complaints when my internet shuts off; and maybe most importantly, listening to the users of the bot, recognizing what works and what functions are confusing or unhelpful to them, and adapting the user-interface to make the commands as intuitive as possible for everyone.

Botty’s been used by thousands of Pokémon GO players in Chicago since 2017 (and is being used in servers in 3 other states as well), and has come to be as his own robot-personality over the past two years. You can find his code on my github. You’ll find a few other bots on there as well, including a Sorting Hat bot I made when Wizards Unite was released, a sort of throwback to my childhood that was mostly spent pretending to be at Hogwarts.