Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/melvnl/discord-alert

Send message to a discord server from your site
https://github.com/melvnl/discord-alert

Last synced: about 2 months ago
JSON representation

Send message to a discord server from your site

Awesome Lists containing this project

README

        

Discord Alert

A lightweight package to send message/notification with http request to discord server

### Install

```js
$ npm install discord-alert

or

$ yarn add discord-alert

```

### Usage

```js
import Notification from "discord-alert";

Notification("discord webhook url", "message");
```

### Parameters

url

your discord server webhook url

message

what message you want to send each time a certain event is being triggered.

### Example

There are various cases where you can use this package. I'm using it to send a notification each time a user submits a support message for my personal [site](https://www.melvinliu.com/support).

Instead of receiving the notification through email which is quite convoluted (since you need an SMTP server, etc to make it work). I see discord webhook is much simpler and suit my need.

### Changelog

1.0.0

Initial version with javascript

1.0.1

Accidental increment (you can ignore this version 😅 )

1.1.0

Update from javascript to typescript

### Author

- [melvnl](https://github.com/melvnl/)