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 🙏

© 2025 – Pkg Stats / Ryan Hefner

easy-discord-embeds

v1.0.2

Published

A simple package to easily create and send embeds in Discord bots.

Downloads

166

Readme

easy-discord-embeds

License

A simple package to easily create and send embeds in Discord bots using discord.js. This package abstracts away the need to manually construct embed objects, allowing you to focus on what matters.

📦 Installation

npm install easy-discord-embeds

🚀 Usage

Import the Library

For Node.js

const { sendEmbed } = require('easy-discord-embeds');

🧑‍💻 Example Usage for Slash Commands

Here’s an example of how to use easy-discord-embeds with Slash Commands to send a simple embed in your Discord bot:

const { sendEmbed } = require('easy-discord-embeds');

module.exports = {
  data: {
    name: 'sendembed',
    description: 'Send an embed.',
  },
  async execute(interaction) {
    sendEmbed(interaction, {
      title: 'Simple Embed!',
      description: 'This is a simple description.',
      color: 0x3498db, // Blue color
    });
  },
};

🧑‍💻 Example Usage for Message Commands

Here’s an example of how to use easy-discord-embeds with Message Commands (prefix-based commands) to send an embed:

const { sendEmbed } = require('easy-discord-embeds');

module.exports = {
  name: 'sendembed',
  description: 'Send an embed.',
  async execute(message) {
    sendEmbed(message, {
      title: 'Hello!',
      description: 'This is a message embed.',
      color: 0x00ff00, // Green color
    });
  },
};

🎨 Embed Options

Here’s how you can customize the embeds:

  • title: The title of the embed (string)
  • description: The content of the embed (string)
  • color: The color of the embed (hexadecimal value)
  • footer: Optional footer text (object with text and iconURL properties)
  • image: Optional image URL to display in the embed (string)
  • thumbnail: Optional thumbnail URL (string)
  • fields: Optional fields array, where each field has name, value, and optional inline (boolean)


🧑‍💻 Example with Advanced Options:

sendEmbed(message, {
  title: 'Embed with Advanced Options',
  description: 'This embed has footer, image, and fields.',
  color: 0xff5733, // Red color
  footer: {
    text: 'Footer Text',
    iconURL: 'https://example.com/icon.png',
  },
  image: 'https://example.com/image.png',
  thumbnail: 'https://example.com/thumbnail.png',
  fields: [
    {
      name: 'Field 1',
      value: 'This is a field with some content.',
      inline: true,
    },
  ],
});


📝 License

This project is licensed under the MIT License - see the LICENSE file for details.