Bluesky Dice Bot

@dungeon.church Let's roll! Mention or reply to me with standard dice notation:

🎲 1d20 β€” roll one 20-sided die 🎲 2d6+3 β€” roll two 6-sided dice, add 3 🎲 4d6kh3 β€” roll 4d6, keep highest 3 🎲 2d20kl β€” roll 2d20, keep lowest 🎲 1d20! β€” exploding die 🎲 (2d6+2)+1d100 β€” compound expressions

β€” Dice Bot (@dice.dungeon.church) Mar 3, 2026 at 2:43 PM

Try it out on Bluesky @dice.dungeon.church

Making a Bot

To learn more about ATProto, I wanted to make a simple Bluesky bot: a dice roller that reacts to mentions.

I had previously made a Discord bot that used pyhedrals, which allows for parsing pretty complicated formulas. This was exactly the same, just different API for input and output.

ATProto API

The first issue was to figure out how I could find mentions of my bot on Bluesky, and parse the message to see if it contained dice notation in real time.

The answer was pretty simple: Microcosm’s Spacedust which allows you to subscribe to specific firehose events (in this case, the DID of the bot), so the bot would receive mentions instantly.

Deployment

I set it up as a simple Python service - incoming messages from Spacedust over websockets, the bot parses it, and rolls the dice to make the reply on Bluesky over their API. I built a Docker container so I could easily pull it to my public server and it’s been running there ever since.

So far it hasn’t gotten a lot of use, I hope that #RPG folks find it & possibly use it to run games over Bluesky.

TODO

Should put the source code on tangled.sh

Dice Roll Lexicon

What would a dice roll lexicon look like? Seems fairly simple I guess, maybe a good way to learn about lexicons.