@aisaka/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.

Usage no npm install needed!

<script type="module">
  import aisakaDiscordPing from 'https://cdn.skypack.dev/@aisaka/discord-ping';
</script>

README

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.

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