NestCord is a module that integrates Discord.js into NestJS applications โ bringing decorators, dependency injection, and modular architecture to Discord bot development.
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!' }); } }
Install NestCord alongside Discord.js and start building.
A complete toolkit for building production-ready Discord bots with familiar patterns and enterprise-grade architecture.
Use familiar NestJS decorators like @SlashCommand, @Button, @Modal and more โ no boilerplate, just clean expressive code.
Structure your bot with NestJS modules. Full support for providers, guards, interceptors, and pipes.
Complete TypeScript types for Discord interactions, commands, and events. Catch bugs at compile time.
Built on Discord.js v14 and NestJS โ battle-tested libraries trusted by millions of developers.
Pagination, sharding, localization, Lavalink and more โ all built-in modules ready to plug in.
Slash commands, context menus, buttons, select menus, modals, autocomplete โ everything Discord supports.
Join thousands of developers using NestCord to power their Discord bots. Start with the docs or ask the community for help.