Built for the AI agent era in Discord. Render Mermaid diagrams, LaTeX, and rich Markdown seamlessly to turn raw agent responses into intuitive visual insights.
Discord Rendering Enhanced — a BetterDiscord plugin that also adds image link previews and Markdown extras (headings, GFM tables, <details> blocks, horizontal rules) beyond what Discord natively supports.
It was originally built for the zeroclaw bot — diagrams, tables, and structured Markdown it posts now render properly instead of showing up as raw text. As agents like zeroclaw and openclaw increasingly live inside Discord full-time as always-on collaborators rather than one-off slash commands, that kind of structured output is becoming the norm rather than the exception — this plugin exists to render it properly for any agent posting that way.
- Mermaid diagrams — flowcharts, sequence diagrams, class diagrams, state diagrams, Gantt charts, git graphs, and more, rendered straight from
```mermaidcode blocks. - Markdown extras —
#headings, GFM| a | b |tables,---horizontal rules, GitHub-style> [!NOTE]/[!TIP]/[!IMPORTANT]/[!WARNING]/[!CAUTION]alerts, and<details>/<summary>collapsible sections. - LaTeX math — raw
\(...\),\[...\],$...$, and$$...$$math rendered with KaTeX. Backtick-wrapped math (e.g.`$x^2$`) is left alone — that's handled by the separate LaTeX Renderer plugin. - Image link previews —
renders as an inline image instead of a plain link. - Offline-capable — Mermaid/KaTeX are downloaded once and cached locally, so the plugin keeps working without a network connection after the first load.
Sequence diagram, rendered live in a zeroclaw dev channel:
Class diagram:
State diagram:
Gantt chart and git graph:
GFM tables and syntax-highlighted code blocks:
Inline and display math, tested live against the zeroclaw bot:
The Schrödinger equation, conditional probability, and mean/variance formulas:
LaTeX tables and chemical formulas:
Greek letters and special symbols:
The plugin file is
DC_Render_Enhanced.plugin.js. Its internal identity (the@name/CONFIG.nameBetterDiscord uses for the Plugins-list label and for saved settings) is unchanged — it'll still show up as MarkdownMermaid there, and existing saved settings/cache carry over. If you're updating an existing install, remove the oldMarkdownMermaid.plugin.jsfile and re-enable the plugin under its new filename.
- Download
DC_Render_Enhanced.plugin.js. - Place it in your BetterDiscord
pluginsfolder (%APPDATA%\BetterDiscord\pluginson Windows). - Enable MarkdownMermaid in BetterDiscord's Plugins settings.
On first use, the plugin downloads Mermaid and KaTeX from a CDN and caches them locally (.markdownmermaid-libs/) so it doesn't need to re-download on every restart.
Each feature (Markdown extras, Mermaid, LaTeX, image previews) can be toggled independently from the plugin's settings panel, which also shows the load status of Mermaid/KaTeX and lets you clear the cache and force a re-download.
- discord-markdown-renderer — a console-pasteable script tackling the same Discord Markdown gaps (tables,
---, headings, etc.). Early versions of this plugin's Markdown-extras detection were prototyped against that idea; the current implementation (DOM-text-flattening, table/heading/rule detection, hide-and-render) is an independent implementation, packaged as a proper BetterDiscord plugin alongside Mermaid, LaTeX, and image-preview support the gist doesn't attempt. - discord-latex by BinaryQuantumSoul, licensed under Apache License 2.0 — a MathJax-based LaTeX renderer for Discord. This plugin's own KaTeX-based math support is scoped to raw (non-backtick-wrapped) LaTeX specifically so it can coexist with discord-latex instead of double-rendering the same math. The Discord message-content webpack class-resolution helper (
CLASS_MESSAGE_LIST_ITEM/CLASS_MESSAGE_CONTENT/selector fallbacks) inDC_Render_Enhanced.plugin.jsis adapted directly from its source, used here under the same license.








