JSPM

discord-transcript-beta

1.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q15391F
  • License MIT

A Discord HTML Transcript Generator

Package Exports

  • discord-transcript-beta

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (discord-transcript-beta) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Discord Transcript

npm package stats

  • NPM package that creates a HTML Transcript of a channel messages that can be saved for later use
  • Useful for users that wants to store messages
  • Useful for Tickets

Check out our website dtranscript.cf coming soon.

Install from NPM

$ npm i discord-transcript --save

Usage

  • generate(message, MessageCollection, Channel - Generate Transcript
    • message: Last Message of the channel
    • MessageCollection: Discord.js Collection of Messages | .channel.messages.fetch({limit:number})
    • Channel: Channel object of the channel | .channel
  • getTranscript(msg, id - Get Transcript url
    • msg: Last Message of the channel |
    • id: ID of the channel where the transcript was generated | .channel.id

Examples

const tranascript = require('discord-transcript');
const Discord = require("discord.js");
const client = new Discord.Client();

client.on("message", async(message) => {
let channel = message.channel;


let messagecollection = message.channel.messages.fetch({
limit: 100

});

let link = await transcript.generate(message, messagecollection, channel);

return message.channel.send(link);
});
/*
OUTPUT: 

{
  "url": "https://discord-archive.herokuapp.com/view?id=841050751571853342",
  "id": "841050751571853342",
}
*/

Contributing

Feel free to create any issues and PRs in our github repository if you want to contribute.

© Abdi Hassan, 2020-2021