1.1.0 • Published 5 years ago

discord.js-image-logger v1.1.0

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

Discord.js 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.

Installation

npm i --save discord.js-image-logger That's it!

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

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("discord.js-image-logger");

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

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

Problems?

Feel free to join the Discord server with discord.gg/FKYrX4X or open an issue on the repo.