This package uses the best of the NodeJS world under the hood. Discord.js is the most powerful library for creating bots and Nest.js is a progressive framework for creating well-architectured applications. This module provides fast and easy way for creating Discord bots and deep integration with your NestJS application.
npm install necord discord.js
1import { Injectable, Logger } from '@nestjs/common';
2import { Once, On, Context, ContextOf } from 'necord';
3
4@Injectable()
5export class AppService {
6 private readonly logger = new Logger(AppService.name);
7
8 @Once('ready')
9 public onReady(@Context() [client]: ContextOf<'ready'>) {
10 this.logger.log(`Bot logged in as ${client.user.username}`);
11 }
12}