1.4.6 • Published 5 years ago

discord.js-artisan v1.4.6

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Discord Artisan

Version Downloads Build status

About

Artisan is the add-in for discord.js which allows you to delete, save messages with files from the dialogue/channels.

Install

  • npm install discord.js-artisan <> yarn add discord.js-artisan

Example

const { Client } = require('discord.js')
const { Artisan } = require('discord.js-artisan')

const bot = new Client()
const artisan = new Artisan({
    pathToSave: 'YOUR_CUSTOM_PATH_HERE',
    saveEmbeds: true
})

bot
    .once('ready', () => console.log('Ready!'))
    .on('message', message => {
        const { id: messageId, author, client, channel, content: cmd } = message
        if (client.user.id !== author.id) return

        // messageId - ID before which there will be a search for messages

        if (cmd === 'dump') return artisan.dumper(channel, messageId)
        else if (cmd === 'clear') return artisan.cleaner(channel, messageId)        
    })
    .login('YOUR_USER_TOKEN_HERE').catch(console.error)

Available options

TypeNameDescriptionDefault
StringpathToSavePath where dumper files will be storedfolder "dump" in work directory
BooleansaveEmbedsWhether to save embedsfalse
BooleansaveAttachmentsWhether to save attachmentstrue

These options need to be placed in the object and passed at constuctor Artisan

1.4.6

5 years ago

1.4.5

5 years ago

1.4.3

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago