🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

nestjs-discord-webhook

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nestjs-discord-webhook

webhook to send logs to discord channel based on nestjs-slack-webhook concept

1.11.9
latest
Source
npm
Version published
Weekly downloads
3
-57.14%
Maintainers
1
Weekly downloads
 
Created
Source

nestjs-discord-webhook

Actions Status npm version

Nest.js + Discord Webhook Client

Description

A simple nestjs package to connect to Discord webhook using discord.js library.

Requirements

Discord.js Library version 14.7.1 or higher

Install

npm install nestjs-discord-webhook

Usage

@Module({
  imports: [
    DiscordModule.forRoot({
      url: "DISCORD_WEBHOOK_URL", // ref: 
    }),
  ],
})
export class AppModule {}

or using webhook token and id:

@Module({
  imports: [
    DiscordModule.forRoot({
      id: "DISCORD_WEBHOOK_ID", // ref: 
token: "DISCORD_WEBHOOK_TOKEN", // ref: }), ], }) export class AppModule {}

Inject IncomingWebhook instance

import { WebhookClient } from "discord.js" 

@Injectable() export class AppService { constructor( @InjectDiscord() private readonly discord: WebhookClient, ) {} }

Contributing

PRs accepted.

License

MIT © Andromeda7177

Changes needing to happen

  • remove redundant code from slant transfer to discord platform
  • Fix bug to allow nestjs configModule service paramaters to discordModule.forAsync useFactory

Supporting

This software is based on G59 nestjs-slack-webhook package

Extra Support

Buy Me A Coffee

Keywords

nest

FAQs

Package last updated on 08 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts