1.0.11 • Published 5 years ago

djs-image-logger v1.0.11

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

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 });.

OptionTypeDescriptionDefault
methodStringThe default logging of image attachments."link"
channelsObject/ArrayA list of channel names or ID's to log images from, if not server wide.
serverWideBooleanEnable/disable server wide attachment logging, rather than channel specific.false
logChannelStringA name or ID of a channel to log images by default."image-logs"
loggingBooleanEnables some extra, none needed logging.false
acceptRoleStringA name of a role to give to accepted users, when their image is accepted through the embed methodfalse

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.

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago