/discord-ping

🔔 Get a webhook ping for your code! Want to know exactly when something happens and keep a log of it for free? use discord! Log when someone views your site, makes a purchase, whenever any action takes place! 💕

Primary LanguageJavaScript

discord-ping

Get a ping to one of your discord channels! Set unique actions, so you get notified when something happens on your website straight to your discord server.

What this does

get notifications on your phone, have interactions with users about website updates, possiblities are endless.

Showcase

Installation

npm i @aisaka/discord-ping

Usage

import {pingDiscord} from '@aisaka/discord-ping'

...

const options = {
    title: `Your Embed title`, //big title on your discord message
    desc: `Something happened on my sight!`, //embed description field
    location: true, //true default
    color: '#2a2a2a' //Color of your message, blue by default
}


pingDiscord(YOUR_WEBHOOK_URL, options);

...

Getting a discord webhook URL

Go into a server you have webhook permissions for, and follow the screen shots below.

Step one Step two Step three

Please make sure to update tests as appropriate.

License

MIT