1.2.42 • Published 3 years ago

q-bot-transcript v1.2.42

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

❔ q-bot-transcript

fetchTranscript

// destructure the package
const { fetchTransript } = require("q-bot-transcript");
const { MessageAttachment } = require('discord.js')
// here is how you use it

// template
// fetchTranscript(message: any, numberOfMessages: number, sendToAuthor: boolean)

// returns buffer

//example
module.exports = {
    name: "transcript",
    run: async (client, message) => {
        fetchTransript(message, 5).then((data) => {
            const file = new MessageAttachment(data, "index.html");
            message.channel.send(file);
        });
    },
};