2.0.2 • Published 2 years ago

transcript-messages v2.0.2

Weekly downloads
-
License
CC-BY-SA-4.0
Repository
github
Last release
2 years ago

About

transcript-messages allows you to easily transcript and import transcripts of Discord Channels (specialized in tickets).

Installation

Discord.js v13 or above is needed.

npm install transcript-messages
yarn add transcript-messages
pnpm add transcript-messages

How to use

It's easy to use:

index.js

require(`transcript-messages`)(require); // Must be started before `Discord.js`.
const Discord = require(`discord.js`);

const client = new Discord.Client(...);
// ...

client.transcripts = new Discord.Collection(); // Make a temporary collection to save transcripts, you probably would want to use a DB instead

transcript.js

const json = await interaction.channel.transcript(); // Remember, it's an async function!
interaction.client.transcripts.set(interaction.guild.id, json);

loadTranscript.js

const webhook = interaction.channel.createWebhook(...);

await interaction.channel.importTranscript(
  interaction.client.transcripts.get(interaction.guild.id),
  webhook // ...or you can leave this alone and it will generate it but it will not handle errors
);
2.0.2

2 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago