Now with Discord.js v14 support

Build Discord botsthe NestJS way

NestCord is a module that integrates Discord.js into NestJS applications — bringing decorators, dependency injection, and modular architecture to Discord bot development.

app.service.ts
import { Injectable } from '@nestjs/common';
import { Context, SlashCommand, SlashCommandContext } from '@globalart/nestcord';

@Injectable()
export class AppService {
  @SlashCommand({
    name: 'ping',
    description: 'Ping-Pong command!',
  })
  async onPing(@Context() [interaction]: SlashCommandContext) {
    return interaction.reply({ content: 'Pong!' });
  }
}

Up and running in seconds

Install NestCord alongside Discord.js and start building.

$pnpm add @globalart/nestcord discord.js

Everything you need

A complete toolkit for building production-ready Discord bots with familiar patterns and enterprise-grade architecture.

Decorator-Based API

Use familiar NestJS decorators like @SlashCommand, @Button, @Modal and more — no boilerplate, just clean expressive code.

Modular Architecture

Structure your bot with NestJS modules. Full support for providers, guards, interceptors, and pipes.

Fully Type-Safe

Complete TypeScript types for Discord interactions, commands, and events. Catch bugs at compile time.

High Performance

Built on Discord.js v14 and NestJS — battle-tested libraries trusted by millions of developers.

Rich Ecosystem

Pagination, sharding, localization, Lavalink and more — all built-in modules ready to plug in.

All Interaction Types

Slash commands, context menus, buttons, select menus, modals, autocomplete — everything Discord supports.

Open Source · MIT License

Ready to build your
Discord bot?

Join thousands of developers using NestCord to power their Discord bots. Start with the docs or ask the community for help.