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

djs-image-logger

v1.0.11

Published

Logs images sent in a channel or the entire server with a discord.js bot. A re-write of 'https://nodei.co/npm/discord.js-image-logger'

Downloads

6

Readme

Djs Image Logger

A simple addon for Discord.js bots to log images sent in a specified channel, channels or the entire server. It can log either with RichEmbeds or with the link to the file.

A re-write of the NPM Package discord.js-image-logger!

Installation

npm install djs-image-logger --save

DIL Options

A full list of options and their defaults you can pass in new <DIL>(<Client>, { options });.

| Option | Type | Description | Default |
| --- | --- | --- | --- | | method | String | The default logging of image attachments. | "link" | | channels | Object/Array | A list of channel names or ID's to log images from, if not server wide. | [ ] | | serverWide | Boolean | Enable/disable server wide attachment logging, rather than channel specific. | false | | logChannel | String | A name or ID of a channel to log images by default. | "image-logs" | | logging | Boolean | Enables some extra, none needed logging. | false | | acceptRole | String | A name of a role to give to accepted users, when their image is accepted through the embed method | false |

Usage

This will be an extremely basic example of how to setup the module.

// First we require the Discord.js library.
const Discord = require("discord.js");

// Now we require the module.
const DIL = require("djs-image-logger");

// Start a new Discord Client.
const client = new Discord.Client();
// Start the module with some custom options.
DIL(client, {
  method: "embed",
  logChannel: "image-logs",
  channels: [""],
  acceptRole: "Accepted"
})

// Login the Client
client.login("your discord bot token");

Credit

This is a re-write of the NPM Package discord.js-image-logger! This one added a neat feature to the embed method, while turning the embed logging method into a picture accept/deny thing.

Can be usefull for Fortnite Item-shops creator codes so user's can get a role if they use the creator code, of course there are more ways you can do this but this is the reason I made it.