Mineral

Mineral

September 8, 2026

A Dart framework for building Discord bots, designed with developer experience first.

Why Dart?

It's the first question everyone asks. And it's a fair question.

When Baptiste Parmentier and I started working on Mineral, I was already using Dart for other projects. The language is elegant, strongly typed, fast to compile — and rarely used outside of Flutter. That was precisely a reason to pay attention to it.

The Discord bot space was dominated by JavaScript/TypeScript (discord.js) and Python (discord.py). Nobody was doing Dart seriously. That felt like an opportunity.

What Mineral is

Mineral is a framework for building Discord bots in Dart. It abstracts the complexity of the Discord API — specifically WebSocket management and connection lifecycle — so developers can focus on what matters: their bot's logic.

The goal was never to compete with discord.js in terms of popularity. The goal was to deliver the best possible developer experience within the Dart ecosystem.

Technical challenges

Managing the Discord WebSocket

Discord's Gateway API is built on a WebSocket protocol with precise requirements: regular heartbeats, automatic reconnection, sequence tracking, rate limiting. Implement any of these incorrectly, and the bot disconnects, misses events, or gets banned by Discord.

This low-level work — which the end user of the framework will never see — is what demands the most care. It's the kind of invisible code that simply has to work.

Discord's... approximate documentation

Discord's official documentation is notoriously incomplete or ambiguous in certain areas. Understanding the actual behaviour of the API often means reading the source code of other libraries, testing edge cases, or digging through developer forums.

Frustrating. Also formative.

The focus: developer experience

What I care about most in Mineral is how it feels to use it.

Is the API intuitive? Are error messages readable? Does the documentation get you started in under 10 minutes? Does the type system help rather than hinder?

These questions drive every design decision. A framework can be technically brilliant and deeply frustrating to use. I want Mineral to be the opposite: simple on the surface, solid underneath.

What's next

Mineral isn't in a production release yet. There's still work to do — particularly around CLI integration, to make creating a new project as simple as mineral new my-bot.

The long-term goal: a stable, documented release, and real adoption by Dart developers who want to build Discord bots without sacrificing code quality.

This is the project I care about most out of everything I've built.