Take a look around.
Discord bots / Part 2 of 6

Building interactive Discord products: Midjourney and Avrae

By Lan T.4 min read

A Discord bot can be the interface to a complete product. Midjourney lets people request and refine images; Avrae helps a group play D&D using character records and game rules. Both examples connect a short interaction to a larger application behind it.

An original image-studio concept with a completed coastal pavilion image and Save image, Make a variation and New request controls.
Original product concept showing a completed creative request and the next available actions; not a capture of Midjourney or Avrae.Open the full image ↗
Reference case

Midjourney: request, result, next choice

The official Discord guide describes entering a prompt, receiving an image grid and choosing an image or a variation. A person can keep working from the response rather than start each request from scratch.

This is a useful interaction pattern for a creative tool: collect an input, show the output and make the next available actions easy to find. A new application can use that pattern with its own provider, interface and rules.

Reference case

Avrae: a shared activity with rules and records

Avrae supports D&D play with character sheets, dice rolls and initiative tracking. D&D Beyond also documents an account connection that makes a player’s owned content available through the bot.

The interesting product lesson is continuity. A command acts on an existing character and a shared game state. The next action depends on what the group has already done, so the application needs more than a one-off reply.

Design a journey someone can try

For an original image tool, a first journey might be: enter a short description, see that the request was received, open the finished image, then save it or ask for a variation. For a game tool, it might be: connect a character, join the session and take one permitted action.

Keep the first journey focused. Write the visible result for success, invalid input, waiting work and a provider failure. Decide what should happen if the person taps a button twice or returns after the original interaction has expired.

StageA concrete decision
RequestWhich inputs are required, and who may submit them?
ProcessingWhat can the person see while work continues?
ResultWhat confirms that the requested work completed?
Next actionWhich choices apply to this particular output or record?

Connect Discord to the application behind it

Node.js and TypeScript can receive interactions, call approved APIs and coordinate work. PostgreSQL or MySQL can store records such as requests, linked accounts and job history. A ReactJS workspace can help staff inspect the work and recover an operation.

The interface should acknowledge a request within Discord’s supported interaction window. Longer work needs an appropriate deferred response and a durable record, with a separate status route if it outlasts the follow-up window.

Give people a useful result when something goes wrong

A failed image request should offer an understandable retry. A game action that is no longer valid should explain the current state. Staff should be able to find the relevant record without reading an entire channel history.

Review both the Discord interaction and the staff journey with a person. Coding agents can help draft specifications, implementation and tests; a developer still checks the rules, permissions and real behavior before release.

  • Use a safe test server and controlled example accounts.
  • Check a repeated request and a late result.
  • Verify that one member cannot act on another member’s record.
  • Keep source code, configuration and operating instructions ready for handoff.

Further reading & related work

Product examples and references for the decisions in this note.

Have a similar piece of work?

What product would you like people to use inside Discord?

Tell me what you’re working on ↗

Keep reading