Skip to content

Send message to a discord server from your site

Notifications You must be signed in to change notification settings

melvnl/discord-alert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Alert

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

Install

$ npm install discord-alert

or

$ yarn add discord-alert

Usage

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.

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

About

Send message to a discord server from your site

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published