# djs-image-logger

> 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'

Latest version **1.0.11** (published 2019-04-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install djs-image-logger
pnpm add djs-image-logger
yarn add djs-image-logger
bun add djs-image-logger
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2019-04-19 |
| First published | 2019-03-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 14.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | DieselGaming |
| Maintainers | dieselgaming |

## Links

- npm: https://www.npmjs.com/package/djs-image-logger
- npm.io page: https://npm.io/package/djs-image-logger

## Dependencies (1)

- [discord.js](https://npm.io/package/discord.js.md) ^11.4.2

## Recent versions

- 1.0.11 (latest) — 2019-04-19
- 1.0.10 — 2019-04-19
- 1.0.9 — 2019-04-19
- 1.0.8 — 2019-04-18
- 1.0.7 — 2019-04-06
- 1.0.6 — 2019-04-05
- 1.0.5 — 2019-04-05
- 1.0.4 — 2019-03-29
- 1.0.3 — 2019-03-29
- 1.0.2 — 2019-03-29
- 1.0.1 — 2019-03-29
- 1.0.0 — 2019-03-29

## README

<div align="center">
<p>
Original credit goes to:
</p>
  <p>
    <a href="https://nodei.co/npm/discord.js-image-logger
/"><img src="https://nodei.co/npm/discord.js-image-logger.png?downloads=true&stars=true" alt="NPM info" /></a>
  </p>
</div>  

# 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 <a href="https://nodei.co/npm/discord.js-image-logger/">discord.js-image-logger</a>!

# 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.
```js
// 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 <a href="https://nodei.co/npm/discord.js-image-logger/">discord.js-image-logger</a>! 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.

---
_Source: https://npm.io/package/djs-image-logger · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
