Harmonix is a modern, TypeScript-first framework designed to help you build powerful, scalable, and maintainable Discord bots. With a strong focus on developer experience, it simplifies your workflow so you can spend less time on boilerplate and more time crafting engaging bot features.
Its modular design, type-safety, and built-in development tools make it a solid foundation whether you're prototyping a small project or building a feature-rich application across multiple servers.
It provides a number of powerful features that make it easier to develop fast, reliable, and context-aware Discord bots, including:
- π§ Fully type-safe with first-class TypeScript support
- π§© Modular design with auto-discovery of commands, events and more
- π― Built-in context system for intuitive state management
- π Built-in HMR (Hot Module Replacement) for a seamless dev experience
- π Hook system to customize and extend behavior at runtime
- π§° Developer-first API and DX-focused architecture
Click to expand
Use the following command to scaffold a starter template with all the necessary files and dependencies:
pnpm create harmonix@latest <my-bot>
Harmonix offers a straightforward, user-friendly, and robust solution for writing commands naturally. It automates all repetitive tasks, allowing you to concentrate on developing your bot features.
Example of a commands/ping.ts
:
export default defineSlashCommand(
{ description: 'Ping the bot' },
(interaction) => {
interaction.reply('Pong!')
}
)
Harmonix is an open-source framework and like any great open-source project, it thrives on community contributions.
Whether you're fixing a bug, improving the documentation, suggesting ideas, or building something new, your input matters.
Check out our Contributing Guide to get started.
Published under the MIT license.