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

dwebhook

v1.0.1

Published

A webhook package for discord

Downloads

3

Readme

dwebhook

dwebhook is a free open-source package to create, edit, execute or delete discord webhooks.

Installation

You can download our package from doing below command.

npm install dwebhook

Features

1. Creating webhooks
2. Modifying webhooks
3. Executing webhooks. (Sending messages)
4. Deleting webhooks

This package is too new and there can be errors also executing webhooks does not support embeds for now. They will come in a future version.

Usage

Creating a webhook

 const { WEBHOOK_CREATE, MODIFY_WEBHOOK, EXECUTE_WEBHOOK, DELETE_WEBHOOK } = require('dwebhook')

 /* When you create a webhook you will get a JSON response in the console. Please copy your webhook id and webhook token somewhere safe because you cannot copy webhook url since you created it using API */
 //Image cannot be a url. You have to upload your image to the working directory and then give the path to the image
 // WEBHOOK_CREATE("765640191007784970", "My first webhook", "./example.png", token)
 WEBHOOK_CREATE("channel_id", "name for your webhook", "path to your image", "your discord bot token")

Modifying a webhook

 const { WEBHOOK_CREATE, MODIFY_WEBHOOK, EXECUTE_WEBHOOK, DELETE_WEBHOOK } = require('dwebhook')

 // You can type "default" in the webhook_name and webhook_image to change the name and image to the default settings
 // your image have to go like this "./myimage.png". Supported types are jpg, png and jpeg
 //MODIFY_WEBHOOK("873893171598348299", "765640191007784970", "New webhook", "./newimage.png", token)
MODIFY_WEBHOOK("your webhook_id", "channel_id", "new webhook name", "path to new webhook image", "your discord bot token")

Executing a webhook

 const { WEBHOOK_CREATE, MODIFY_WEBHOOK, EXECUTE_WEBHOOK, DELETE_WEBHOOK } = require('dwebhook')

  //Webhook token is not your bot token
  //Webhook content character limit is 2000
  /* EXECUTE_WEBHOOK("873893171598348299", "7I2RXkxqjBdy7j3cslgEZ3rJ_9M1T-1wEZYccjokJyDkpv6dvrGk5WgFVS_L_Mm-hi-s", "Your message") */
  EXECUTE_WEBHOOK("webhook_id", "webhook_token", "Your message goes here")

Deleting a webhook

 const { WEBHOOK_CREATE, MODIFY_WEBHOOK, EXECUTE_WEBHOOK, DELETE_WEBHOOK } = require('dwebhook')

  //DELETE_WEBHOOK("873893171598348299", "7I2RXkxqjBdy7j3cslgEZ3rJ_9M1T-1wEZYccjokJyDkpv6dvrGk5WgFVS_L_Mm-hi-s")
  DELETE_WEBHOOK("webhook_id", "webhook_token")

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT