Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/MeowTaiga/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! 💕
https://github.com/MeowTaiga/discord-ping

Last synced: about 2 months ago
JSON representation

🔔 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! 💕

Awesome Lists containing this project

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.

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

![Showcase](https://i.imgur.com/vaFiBkI.png)

## Installation

```bash
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](https://i.imgur.com/z0qLDfU.png)
![Step two](https://i.imgur.com/r1nUGCX.png)
![Step three](https://i.imgur.com/PrXMUXN.png)

Please make sure to update tests as appropriate.

## License
[MIT](https://choosealicense.com/licenses/mit/)