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:

Turtwig, the Tiny Leaf Pokémon

Turtwig, the Tiny Leaf Pokémon

The inline buttons let you navigate to more detailed information:

Turtwig's base stats

Turtwig's base stats

Turtwig's evolutions

Turtwig's evolutions

Where to catch Dratini

Where to catch Dratini

Rotom Pokédex bot also knows about abilities, items and moves:

Timer ball

Timer ball

Pixilate

Pixilate

Grass knot

Grass knot

Using inline queries, you can search and send Pokédex entries to other chats as well:

An inline query for the term "magne" showing results for Magnet, Magby, Rage and Mime Jr.

Check out Rotom Pokédex bot on Telegram at @rotom_pokedex_bot!

Background

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 decided to rewrite evolve it to actually be useful.

Post-evolution

Rotom Pokédex bot is now powered by the excellent pokedex library by Veekun:

veekun/pokedex
more than you ever wanted to know about Pokémon
https://github.com/veekun/pokedex

The library is used used by Veekun's Pokédex and many others, as well as projects like PokéAPI.

Rotom Pokédex bot itself is a simple Python 3 webapp using Tornado:

yi-jiayu/rotom-pokedex-bot-2
Rotom Pokédex bot evolved
https://github.com/yi-jiayu/rotom-pokedex-bot-2

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.