Discord Embeds
Live visual preview, static AST analyzer, and source-mapped inspector for Discord.js Embeds, Components V1, Components V2, and Modals in Visual Studio Code.
Remember to ⭐ star MZRCode/discord-embeds on GitHub if you ❤️ it!
Zero-Execution Safety: Your bot code is analyzed purely via static TypeScript AST parsing, so tokens, database calls, and side effects are never executed.
📌 Features
- Live preview as you type for JavaScript & TypeScript (
discord.js v13, v14, and v15).
- Full support for
EmbedBuilder, Buttons, and all Select Menus.
- Complete Components V2 (
Container, Section, TextDisplay, MediaGallery, Separator, File) & Modals.
- Authentic Dark, Ash, and Light Discord themes with Ephemeral & Verified
APP previews.
- Full Discord Markdown rendering with syntax-highlighted code blocks.
- Automatic
if / else and switch / case branch switching with Pin & cursor auto-follow.
- Click preview to jump to source code, plus Tree, Limits & Checks, and JSON Inspector.
👀 Preview
Open any .js, .ts, .jsx, or .tsx file using discord.js and click the Open Discord Embeds button in the editor title bar (Ctrl+Shift+P → Discord Embeds: Open Discord Embeds).
Supported Discord.js Examples (Components V1 & Components V2)
// Components V1: EmbedBuilder + ActionRow
const embed = new EmbedBuilder()
.setColor('#5865F2')
.setTitle('Server Status')
.setDescription('All shards are **online** and operational.')
.addFields(
{ name: 'Ping', value: '```yaml\n24ms\n```', inline: true },
{ name: 'Uptime', value: '```yaml\n99.98%\n```', inline: true },
);
await interaction.reply({ embeds: [embed], ephemeral: true });
// Components V2: ContainerBuilder + SectionBuilder
const container = new ContainerBuilder()
.setAccentColor(0x5865f2)
.addSectionComponents(
new SectionBuilder()
.addTextDisplayComponents(
new TextDisplayBuilder().setContent('### Support Server\nJoin our community for updates!'),
)
.setButtonAccessory(
new ButtonBuilder()
.setLabel('Join Server')
.setStyle(ButtonStyle.Link)
.setURL('https://discord.gg/example'),
),
);
await interaction.reply({
components: [container],
flags: MessageFlags.IsComponentsV2,
});
📥 Installation
Launch VS Code Quick Open (Ctrl+P / Cmd+P), paste the following command, and press enter.
ext install mzrdev.discord-embeds
OR
Use the Extension Marketplace

❓ How to Open
Click the Open Discord Embeds icon in the editor title bar (top right), or open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run Discord Embeds: Open Discord Embeds.
OR
Open Discord Embeds from the Secondary Side Bar, click ..., and choose Open in Editor Tab:

⚙️ Configuration
Customize Discord Embeds through VS Code Settings (Ctrl+,) or settings.json:
| Setting |
Type |
Default |
Description |
discordEmbeds.botName |
string |
"Discord Embeds" |
Display name shown in the simulated bot/app message header |
discordEmbeds.theme |
"dark" \| "ash" \| "light" |
"dark" |
Default Discord canvas theme |
discordEmbeds.debounceMs |
number |
180 |
Delay (50–2000 ms) before re-analyzing unsaved document edits |
discordEmbeds.showInspectorByDefault |
boolean |
false |
Enable hover inspector overlays by default |
discordEmbeds.syncEditorCursor |
boolean |
true |
Highlight the matching preview element when moving the editor cursor |
discordEmbeds.followCursor |
boolean |
true |
Automatically switch the active preview message to match the editor cursor when not pinned |
discordEmbeds.verifiedBadge |
boolean |
true |
Show the Verified checkmark badge inside the bot APP tag |
discordEmbeds.defaultImageUrl |
string |
"https://mzrdev.com/logo.png" |
Fallback image URL used for dynamic or unresolved image URLs |
discordEmbeds.matchAttachmentWidth |
boolean |
true |
Stretch attachment cards below an embed or container to match its width |
discordEmbeds.blockquoteBackground |
boolean |
false |
Show a shaded background behind Markdown blockquotes (>) instead of only the left bar |
discordEmbeds.syntaxHighlightJson |
boolean |
true |
Apply syntax coloring to JSON output in the Inspector drawer |
discordEmbeds.showVersionBadge |
boolean |
true |
Show the detected discord.js version label in the Inspector bar |
discordEmbeds.showMessagePills |
boolean |
false |
Show numbered quick-select pill buttons above the preview for fast message switching (the dropdown menu is always available) |
👨💻 Contributing
To contribute to Discord Embeds, feel free to fork the repository and submit a pull request:
- Fork & clone the
main branch from MZRCode/discord-embeds.
- Create a new branch (
git checkout -b feat/my-improvement) and install dependencies (npm install).
- Make your changes and press
F5 in VS Code to test in an Extension Development Host.
- Verify everything compiles and passes (
npm run compile && npm test).
- Commit, push, and open a Pull Request!
🎉 Thanks
- discord.js - Creator of the Discord.js library and builder APIs for Embeds, Components V1/V2, and Modals
👥 Contributors
View all contributors on GitHub
📋 License
This project is licensed under the MIT License - see the LICENSE file for details.