Discord.js is powerful but verbose. Disapp makes it effortless.
|
Discord.js - 15 lines const button1 = new ButtonBuilder()
.setCustomId('confirm')
.setLabel('Confirm')
.setStyle(ButtonStyle.Success);
const button2 = new ButtonBuilder()
.setCustomId('cancel')
.setLabel('Cancel')
.setStyle(ButtonStyle.Danger);
const row = new ActionRowBuilder()
.addComponents(button1, button2);
await interaction.reply({
content: 'Are you sure?',
components: [row]
}); |
Disapp - 1 line await interaction.reply({
content: 'Are you sure?',
components: [confirm('confirm', 'cancel')]
}); |
π See COMPARISON.md for more examples.
|
|
- β 100% Compatible - Uses Discord.js under the hood
- β Production Ready - 301 tests passing, 65%+ coverage
- β Open Source - GPL-3.0 licensed
- β Modern Stack - TypeScript, PNPM, Monorepo
- β Active Development - Regular updates and improvements
npx create-disapp my-bot
cd my-bot
npm install
npm run devgit clone https://github.com/dis-app/disapp.git
cd disapp
pnpm install
pnpm build:core
pnpm dev:botπ See CREATE_DISAPP.md for detailed setup guide.
import { Command, successEmbed, confirm } from '@disapp/core';
export default class DeleteCommand extends Command {
constructor() {
super({
name: 'delete',
description: 'Delete something'
});
}
async execute(interaction) {
await interaction.reply({
embeds: [successEmbed('Confirm', 'Are you sure?')],
components: [confirm('yes', 'no')]
});
}
}import { msg, embed, ButtonStyle } from '@disapp/core';
const message = msg()
.setContent('# User Management')
.buttons(
{ label: 'View', id: 'view', style: ButtonStyle.Primary, emoji: 'ποΈ' },
{ label: 'Edit', id: 'edit', style: ButtonStyle.Secondary, emoji: 'βοΈ' },
{ label: 'Delete', id: 'delete', style: ButtonStyle.Danger, emoji: 'ποΈ' }
)
.userSelect('select_user', 'Choose users', [1, 5])
.addEmbed(
embed()
.info('Info', 'Select an action')
.addFields(
{ name: 'Total', value: '1,234', inline: true },
{ name: 'Online', value: '567', inline: true }
)
)
.build();
await interaction.reply(message);import { UserRepository } from '@disapp/core';
const userRepo = new UserRepository();
const user = await userRepo.getOrCreate(
BigInt(userId),
username,
avatar
);π‘ See EXAMPLES.md for more code examples.
Disapp provides powerful shortcuts to reduce boilerplate:
| Shortcut | Description | Usage |
|---|---|---|
msg() |
MessageBuilder | Build complex messages |
embed() |
EmbedBuilder | Create embeds easily |
btn() |
Button | Create buttons |
primary() |
Primary button | Blue button |
success() |
Success button | Green button |
danger() |
Danger button | Red button |
confirm() |
Confirm/Cancel row | Two-button confirmation |
yesno() |
Yes/No row | Yes/No buttons |
successEmbed() |
Green embed | Success message |
errorEmbed() |
Red embed | Error message |
warningEmbed() |
Yellow embed | Warning message |
infoEmbed() |
Blue embed | Info message |
π See FLUENT_API.md for complete API reference.
disapp/
βββ apps/
β βββ web/ # Next.js documentation website
βββ packages/
β βββ core/ # Core framework (@disapp/core)
β βββ create-disapp/ # CLI scaffolding tool
β βββ config/ # Shared TypeScript configs
βββ examples/
β βββ basic-bot/ # Example Discord bot
βββ docs/ # Documentation files
| Command | Description |
|---|---|
pnpm dev |
Start web documentation server |
pnpm dev:bot |
Run example bot in development |
pnpm build |
Build all packages |
pnpm build:core |
Build core package only |
pnpm test |
Run all tests |
pnpm test:core |
Run core package tests |
pnpm db:push |
Push database schema changes |
pnpm db:studio |
Open Drizzle Studio |
pnpm db:migrate |
Run database migrations |
- π CREATE_DISAPP.md - CLI tool for scaffolding new bots
- π COMPARISON.md - Disapp vs Discord.js comparison
- π₯ HOT_RELOAD.md - Hot reload & auto registry
- π― FLUENT_API.md - Fluent API guide
- π¨ COMPONENTS.md - Component builders
- πͺ COMPONENTS_V2.md - Discord Components V2
- π I18N.md - Multi-language support
- π LEADERBOARD.md - Leaderboard builder
- β‘ ADVANCED_FEATURES.md - Smart handlers, middleware, dynamic config
- π API.md - Complete API reference
- π‘ EXAMPLES.md - Code examples
- π§ͺ TESTING.md - Testing guide
- πΊοΈ ROADMAP.md - Project roadmap
- π€ CONTRIBUTING.md - Contribution guidelines
| Feature | Discord.js | Disapp |
|---|---|---|
| Code Amount | 100% | 10-50% β‘ |
| Readability | Medium | High π |
| Type Safety | β | β |
| Shortcuts | β | β |
| Database | β | β Built-in |
| Logging | β | β Winston |
| Config Management | β | β Centralized |
| Hot Reload | β | β Memory-safe |
| Auto Registry | β | β Automatic |
| i18n Support | β | β JSON-based |
| Cooldowns | Manual | β Built-in |
| Error Handling | Manual | β Global |
| Testing | Manual | β 301 tests |
π See COMPARISON.md for detailed comparison.
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- Fork and clone the repository
- Install dependencies:
pnpm install - Build core package:
pnpm build:core - Run tests:
pnpm test:core - Make your changes and submit a PR
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).
- β Free to use, modify, and distribute
- β Open source and transparent
- β Derivative works must also be GPL-3.0
See LICENSE for full license text.
|
|
- π Documentation
- π¬ Discord Server
- π Issue Tracker
- π¦ NPM Package
The documentation website (apps/web) can be deployed to Vercel:
Manual Setup:
- Import repository to Vercel
- Set Root Directory:
apps/web - Set Install Command:
cd ../.. && pnpm install --frozen-lockfile - Set Build Command:
cd ../.. && pnpm --filter web build - Deploy
See apps/web/BUILD.md for detailed instructions.
Deploy your Discord bot to any Node.js hosting platform:
- Railway - Automatic deployment from Git
- Heroku - Container or buildpack deployment
- DigitalOcean - App Platform or Droplet
- AWS - EC2, ECS, or Lambda
- Self-hosted - VPS with PM2 or systemd
- β v0.1.0 - Comprehensive testing (301 tests, 65%+ coverage)
- π§ v0.2.0 - Documentation improvements (in progress)
- π v0.3.0 - Examples & tutorials (planned)
- π― v1.0.0 - Stable release (planned)
See ROADMAP.md for detailed roadmap.
Made with β€οΈ by the Disapp team
β Star us on GitHub