Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fjodor-rybakov/discord-nestjs
๐พ NestJS package for discord.js
https://github.com/fjodor-rybakov/discord-nestjs
bot decorator discord nest nestjs typescript
Last synced: about 16 hours ago
JSON representation
๐พ NestJS package for discord.js
- Host: GitHub
- URL: https://github.com/fjodor-rybakov/discord-nestjs
- Owner: fjodor-rybakov
- License: mit
- Created: 2020-08-12T18:56:29.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-15T05:08:45.000Z (7 months ago)
- Last Synced: 2024-12-15T14:04:57.502Z (8 days ago)
- Topics: bot, decorator, discord, nest, nestjs, typescript
- Language: TypeScript
- Homepage:
- Size: 5.73 MB
- Stars: 272
- Watchers: 5
- Forks: 49
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master
[travis-url]: https://travis-ci.org/nestjs/nest
[linux-image]: https://img.shields.io/travis/nestjs/nest/master.svg?label=linux
[linux-url]: https://travis-ci.org/nestjs/nest
A progressive Node.js framework for building efficient and scalable server-side applications, heavily inspired by Angular.
## ๐จ๐ปโ๐ป Installation
```bash
$ npm install @discord-nestjs/core discord.js
```Or via yarn
```bash
$ yarn add @discord-nestjs/core discord.js
```## ๐งพ Description
NestJS package for discord.js
This monorepo consists of several packages.
* [@discord-nestjs/core](https://github.com/fjodor-rybakov/discord-nestjs/tree/master/packages/core) - Main package containing decorators, basic types and module declaration.
* [@discord-nestjs/common](https://github.com/fjodor-rybakov/discord-nestjs/tree/master/packages/common) - Contains optional common templates. For example SlashCommandPipe or ValidationPipe.
* [@discord-nestjs/schematics](https://github.com/fjodor-rybakov/discord-nestjs/tree/master/packages/schematics) - Provides cli to create a bot template.
* Samples
* [@sample/command](https://github.com/fjodor-rybakov/discord-nestjs/tree/master/packages/sample/command) - Bot example with slash commands
* [@sample/command-by-glob](https://github.com/fjodor-rybakov/discord-nestjs/tree/master/packages/sample/command-by-glob) - Bot example with slash commands by glob pattern
* [@sample/command-by-http-request](https://github.com/fjodor-rybakov/discord-nestjs/tree/master/packages/sample/command-by-http-request) - Bot example with register slash commands by http request
* [@sample/sub-command](https://github.com/fjodor-rybakov/discord-nestjs/tree/master/packages/sample/sub-command) - Bot example with slash sub-commands and sub-groups
* [@sample/validation](https://github.com/fjodor-rybakov/discord-nestjs/tree/master/packages/sample/validation) - Bot example with slash commands validation
* [@sample/event](https://github.com/fjodor-rybakov/discord-nestjs/tree/master/packages/sample/event) - Bot example with events
* [@sample/dependency-injection](https://github.com/fjodor-rybakov/discord-nestjs/tree/master/packages/sample/dependency-injection) - Bot example with dependency injection
* [@sample/reaction-collector](https://github.com/fjodor-rybakov/discord-nestjs/tree/master/packages/sample/reaction-collector) - Bot example with reaction collector
* [@sample/message-collector](https://github.com/fjodor-rybakov/discord-nestjs/tree/master/packages/sample/message-collector) - Bot example with message collector
* [@sample/interaction-collector](https://github.com/fjodor-rybakov/discord-nestjs/tree/master/packages/sample/interaction-collector) - Bot example with interaction collector
* [@sample/prefix-command](https://github.com/fjodor-rybakov/discord-nestjs/tree/master/packages/sample/prefix-command) - Bot example with prefix command
* [@sample/modals](https://github.com/fjodor-rybakov/discord-nestjs/tree/master/packages/sample/modals) - Bot example with modals## โ Answers on questions
### The bot starts up, but the slash commands and events do not work
Click to expand
Check your intent is passed to the `discordClientOptions` of the module. [More info](https://discordjs.guide/popular-topics/intents.html#privileged-intents)
### I created DTO and added `SlashCommandPipe`, but when I receive response to the command, the DTO fields are missing
Click to expand
Set `useDefineForClassFields` to `true` in your `tsconfig.json`.
Also check that the `@InteractionEvent` decorators are set.Any questions or suggestions? Join Discord https://discord.gg/kv89Q2dXSR