New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dislogg

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dislogg

A library for sending logs to discord

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

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);
ParameterTypeDescription
webhookURLstringRequired. Your discord channel webhook URL. Can be found under Channel Settings > Integrations.
userIDstringRequired. 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!");

Keywords

discord

FAQs

Package last updated on 02 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts