/paper-pigeon

This is a lightweight library to send notifications to discord

Primary LanguageJavaScript

Logo

Installation

npm i paper-pigeon

Discord Usage

import { Discord } from 'paper-pigeon';

const send = new Discord("WEBHOOK_URL");
send.message("Starting server!");
send.success("Data loaded from API");
send.error("Failed to load resource");

Get Discord Webhook URL

Open Discord -> Integrations -> Create Webhook -> Copy Webhook URL

Slack Usage

import { Slack } from 'paper-pigeon';

const send = new Slack("WEBHOOK_URL");
send.message("Starting server!");
send.success("Data loaded from API");
send.error("Failed to load resource");

Get Slack Webhook URL

Create Slack App -> Add incoming webhooks feature -> Activate Webhook -> Add new webhook -> Copy webhook URL

Demo

Live Demo

demo