discord-ghost-transcript-v13

A Message Transcript for Discord Created by GhosterZz_#0001

Usage no npm install needed!

<script type="module">
  import discordGhostTranscriptV13 from 'https://cdn.skypack.dev/discord-ghost-transcript-v13';
</script>

README

Ghost Transcript

Introduction

😊 A easy Transcript Message collector that sends in html format.

Installation

npm i discord-ghost-transcript-v13

Support Server

Options

With Options, you can customize the title, description, date format, date location and the order of messages

Working on Features

Reactions Embeds Downloads Blocks of code File preview for read/write files

Feel free to contribute to this project.

const { fetchTranscript } = require("discord-ghost-transcript-v13");
const { MessageAttachment } = require("discord.js");


//example
const Command = require("../structures/command")
const { fetchTranscript } = require('discord-ghost-transcript-v13');
const Discord = require("discord.js");
module.exports = new Command({
    name: "tscript",
    description: "Sends a message transcript",
    type: "BOTH",
    slashCommandOptions: [],
    permission: "SEND_MESSAGES",
    async run(message){

        console.log()
        fetchTranscript(message, {
            channel: message.channel ,
            numberOfMessages: 20 ,
            inverseArray: true, // order of messages, default is "false"
            dateFormat: "MM/DD/YYYY at HH:mm:ss", // moment date format, default is 'E, d MMM yyyy HH:mm:ss Z'
            dateLocale: "pt-br", // moment locale, default is "en"
            customTitle: `Channel Name: ${message.channel.name}`, // title, default is your guild name
            customDescription: `Channel Description: ${message.channel.topic}`, // description, default is `Transcripted ${numberOfMessages} messages From: ${channel.name}`
        }).then((data) => {
            const file = new Discord.MessageAttachment(data, `${message.channel.name}.html`);
            message.reply({files: [file]});
        });
        
    
    }
});
// it will fetch 5 messages in the current channel with custom options.