Lately, I've been playing through some of the older Pokémon games (Pokémon Platinum and Pokémon White), and built a Telegram bot for quickly looking up in-game things like Pokémon weaknesses or ability effects.
Send Rotom Pokédex bot (@rotom_pokedex_bot on Telegram) a Pokémon name or number to get a quick summary about it:
The inline buttons let you navigate to more detailed information:
Rotom Pokédex bot also knows about abilities, items and moves:
Using inline queries, you can search and send Pokédex entries to other chats as well:
Check out Rotom Pokédex bot on Telegram at @rotom_pokedex_bot!
A long time ago, I wrote a series of posts about the Telegram Bot API on Medium. It walked readers through the process of creating an inline Telegram bot running on Google Cloud Functions which served Pokédex data from a JSON document on the Pokémon website.
That was the original Rotom Pokédex bot. Limited by the data and an arbitrary 100 LOC limit I set to keep it simple, it was mostly a novelty, its usefulness limited to finding out what a particular Pokémon looked like. The entire exercise was really just because I was looking for things to write about.
However, actually playing the Pokémon games gave me a chance to dogfood my own creation, and I
rewrite evolve it to actually be useful.
Rotom Pokédex bot is now powered by the excellent
pokedex library by Veekun:
Rotom Pokédex bot itself is a simple Python 3 webapp using Tornado:
Although the documentation for Veekun's pokedex library specifically mentions that it doesn't work with Python 3, I was pleasantly surprised to find out that that wasn't the case—it's been working out of the box for me on Python 3 with no issues so far. All credit should go to the pokedex team, which has been actively fixing Python 3 compatibility issues.
Rotom Pokédex bot is still a work in progress, and there are many features I haven't gotten around to implementing. For example, I often want to find out what moves a Pokémon can learn and at what level, so it would be nice to be able to view movesets with Rotom Pokédex bot (I've been experimenting a bit with this, and presentation is an issue on narrower screens).
Anyway, do give Rotom Pokédex bot a try, and support the project on GitHub if you're interested! I'm also planning a follow up post on a Caddy middleware I wrote to collect usage statistics for Rotom Pokédex bot without having to implement the logic in the application code itself.