Dice Roller

If anyone is interested in implementing a more versatile dice roller in Discourse using an AI persona, I did this on a community I manage and it works excellently. I set up an AI persona and allowed it to use the Random Picker tool, set the ‘max context posts’ setting to 1, and gave it these instructions:

I connected the persona with a user (in this case @dice), so it can be invoked in any post by saying something like @dice 3d6, and the bot will reply with the result. You can see it in action in this topic of my community (if you’re interested in tabletop gaming, feel free to join the community - it’s very new still).

Of course, this uses AI, so it requires an LLM API key. I’m using GPT-4o-mini, so the cost is very low, especially for the volume I’m looking at here.

4 Likes