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

richer-embed

v1.0.3

Published

An extension of RichEmbed class from discord.js

Downloads

10

Readme

richer-embed

An extension of Discord.js's RichEmbed class, with more functionality such as setting local images as embed.image and embed.thumbnail and personalizing the embed with a User's profile picture and name. Made for farazkaleemmalik/phoenixwright, a bot made with Discord.js.

RicherEmbed

Kind: global class

new RicherEmbed(channelObj, options)

Returns: RicherEmbed - Returns itself

| Param | Type | Description | | --- | --- | --- | | channelObj | Channel | User | Discord.js Channel instance for which the embed is being created | | options | Object | Additional properties to add to embed. An existing embed can also be inserted to turn it into a RicherEmbed instance (may be buggy). |

richerEmbed.personalise(authorObj) ⇒ RicherEmbed

Personalises the embed for a User by changing the title and the thumbnail

Kind: instance method of RicherEmbed
Returns: RicherEmbed - Returns itself

| Param | Type | Description | | --- | --- | --- | | authorObj | User | User to personalise |

richerEmbed.setLocalThumbnail(pathName) ⇒ RicherEmbed

Attaches a local image as a thumbnail for the embed

Kind: instance method of RicherEmbed
Returns: RicherEmbed - Returns itself

| Param | Type | Description | | --- | --- | --- | | pathName | String | Path to image. Relative paths are relative to entry file |

richerEmbed.setLocalImage(pathName) ⇒ RicherEmbed

Attaches a local image as the main image for the embed

Kind: instance method of RicherEmbed
Returns: RicherEmbed - Returns itself

| Param | Type | Description | | --- | --- | --- | | pathName | String | Path to image. Relative paths are relative to entry file |

richerEmbed.setContent(title, content) ⇒ RicherEmbed

Sets content for the embed

Kind: instance method of RicherEmbed
Returns: RicherEmbed - Returns itself

| Param | Type | Description | | --- | --- | --- | | title | String | Title of embed | | content | String | Content of embed, to be set embed.description |

richerEmbed.replace(messageToReplace)

Replaces a message with this embed

Kind: instance method of RicherEmbed

| Param | Type | Description | | --- | --- | --- | | messageToReplace | Message | The message to replace. Note that this overrides the message channel previously set of the new provided is in a different channel |

richerEmbed.send() ⇒ Promise(Message)

Send the message to the channel in embed.channel

Kind: instance method of RicherEmbed

richerEmbed.chat(authorObj, command, imageUrl) ⇒ RicherEmbed

Turns the embed into a chat embed, to be used by a bot command

Kind: instance method of RicherEmbed
Returns: RicherEmbed - Returns itself

| Param | Type | Description | | --- | --- | --- | | authorObj | User | Author of chat command | | command | String | Exact command in the form of "commandName parameters more_parameters". The first word is excluded from the embed's content. | | imageUrl | String | Url of main image |