Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/melvnl/discord-alert
Send message to a discord server from your site
https://github.com/melvnl/discord-alert
Last synced: 3 months ago
JSON representation
Send message to a discord server from your site
- Host: GitHub
- URL: https://github.com/melvnl/discord-alert
- Owner: melvnl
- Created: 2022-03-02T18:08:15.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-15T03:14:44.000Z (almost 3 years ago)
- Last Synced: 2024-01-27T23:11:27.531Z (12 months ago)
- Language: TypeScript
- Size: 5.86 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-made-by-indonesian - discord-alert - `Send notification to a discord server from your site` *by [melvnl](https://github.com/melvnl)* (D)
- made-in-indonesia - discord-alert - `Send notification to a discord server from your site` *by [melvnl](https://github.com/melvnl)* (D)
README
Discord Alert
A lightweight package to send message/notification with http request to discord server
### Install
```js
$ npm install discord-alertor
$ 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/)