discordjs-youtube-tutorials icon indicating copy to clipboard operation
discordjs-youtube-tutorials copied to clipboard

Transcript Bot html embed

Open BeyondBoy1 opened this issue 3 years ago • 1 comments

The transcript bot creates the html file all fine.

The transcript bot works fine in my server, was wondering if the bot could create a HTML of a channel in the channel itself after the channel has been closed?

BeyondBoy1 avatar May 18 '21 10:05 BeyondBoy1

You must fetch the messages of that channel.

Then create basic HTML file code (In a Javascript String or something) then add those messages in the body


<!DOCTYPE html>
<html lang="en">



<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HTML Transcript</title>
</head>

<body>
 <div class="container"> 

   <div id="MESSAGE_ID">
   <span id="author">Arthur</span>
   <span id="content">Text message etc etc</span>
   </div>

  </div>
</body>

</html>

You should add those messages dynamically

So you should create an array where the html code (for only messages) and map that array into the HTML String

arthurvanl avatar Dec 08 '21 09:12 arthurvanl