npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

easywebhook

v2.0.1

Published

This makes using webhooks for Discord alot Easier!

Downloads

10

Readme

easywebhook

This makes using webhooks for Discord alot Easier!

Usage

create()

const EasyWebhook = require('easywebhook'); // Require the Package from NPM
const webhook = new EasyWebhook('Your new Webhook Name', 'Your new Webhook Avatar');

webhook.create('Discord Bot Token', 'Channel ID').then(r => {
  console.log(r)
});

/*Returns
{
    "name": "test webhook",
    "channel_id": "199737254929760256",
    "token": "3d89bb7572e0fb30d8128367b3b1b44fecd1726de135cbe28a41f8b2f777c372ba2939e72279b94526ff5d1bd4358d65cf11",
    "avatar": null,
    "guild_id": "199737254929760256",
    "id": "223704706495545344",
    "user": {
        "username": "test",
        "discriminator": "7479",
        "id": "190320984123768832",
        "avatar": "b004ec1740a63ca06ae2e14c5cee11f3"
    }
}
*/

send()

const EasyWebhook = require('easywebhook'); // Require the Package from NPM
const webhook = new EasyWebhook('Your new Webhook Name', 'Your new Webhook Avatar');

webhook.send(webhook_id, webhook_token, content).then(r => {
  console.log(r)
});

/*
webhook_id = webhook id
webhook_token = webhook token
content = embed or a message
*/

modify()

const EasyWebhook = require('easywebhook'); // Require the Package from NPM
const webhook = new EasyWebhook('Your new Webhook Name', 'Your new Webhook Avatar');

webhook.modify(webhook_id, name, avatar).then(r => {
  console.log(r)
});

/*
webhook_id = webhook id
name = new name
avatar = new avatar
*/

modifyWithToken()

const EasyWebhook = require('easywebhook'); // Require the Package from NPM
const webhook = new EasyWebhook('Your new Webhook Name', 'Your new Webhook Avatar');

webhook.modify(webhook_id, webhook_token, name, avatar).then(r => {
  console.log(r)
});

/*
webhook_id = webhook id
webhook_token = webhook token
name = new name
avatar = new avatar
*/

delete()

const EasyWebhook = require('easywebhook'); // Require the Package from NPM
const webhook = new EasyWebhook('Your new Webhook Name', 'Your new Webhook Avatar');

webhook.delete(webhook_id).then(r => {
  console.log(r)
});

/*
webhook_id = webhook id
*/

deleteWithToken()

const EasyWebhook = require('easywebhook'); // Require the Package from NPM
const webhook = new EasyWebhook('Your new Webhook Name', 'Your new Webhook Avatar');

webhook.deleteWithToken(webhook_id, webhook_token).then(r => {
  console.log(r)
});

/*
webhook_id = webhook id
webhook_token = webhook token
*/

getUser()

const EasyWebhook = require('easywebhook'); // Require the Package from NPM
const webhook = new EasyWebhook('Your new Webhook Name', 'Your new Webhook Avatar');

webhook.getUser(bot_token, userid/botid).then(r => {
  console.log(r)
});

/*
bot_token = your bot's token
userid/botid = a user's id or bot id
*/

Credits

Zelak#6169 - Helped me on Ratelimits
ExtasyMonst4#0001 - Helped me too on Ratelimits