This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

discord.js-artisan
TypeScript icon, indicating that this package has built-in type declarations

1.4.6 • Public • Published

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

Type Name Description Default
String pathToSave Path where dumper files will be stored folder "dump" in work directory
Boolean saveEmbeds Whether to save embeds false
Boolean saveAttachments Whether to save attachments true

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

Package Sidebar

Install

npm i discord.js-artisan

Weekly Downloads

7

Version

1.4.6

License

MIT

Unpacked Size

78.2 kB

Total Files

13

Last publish

Collaborators

  • lerisen