dislogg

1.0.1 • Public • Published

Dislog

Dislog is a small package which sends over important logs to discord via webhooks. Initialize once and send everywhere.

Installation

Install dislog with npm

  npm install dislogg

API Reference

Initializing Dislog

const dislog = new Dislog(webhookURL, userID);
Parameter Type Description
webhookURL string Required. Your discord channel webhook URL. Can be found under Channel Settings > Integrations.
userID string Required. Your discord user ID. Can be found by right clicking on your profile.

log(message)

Takes a message to be sent as a message in the discord channel.

alert(message)

Works similarly as log(), but also pings the specified user while initializing the library.

Usage

import Dislog from "dislog";

// discordUserID can be found be right-clicking on your profile.
// webhookURL can be found in channel settings under Integrations.
const dislog = new Dislog(webhookURL, discordUserID);

// Send a simple log
dislog.log("Hi, this function will log something.");

// Send a alert, will ping the user
dislog.alert("This is an alert!");

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    0
  • 1.0.0
    1

Package Sidebar

Install

npm i dislogg

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

15.2 kB

Total Files

5

Last publish

Collaborators

  • dawksh