mahtoid / DiscordChatExporterPy

A simple Discord chat exporter for Python Discord bots.
GNU General Public License v3.0
210 stars 75 forks source link

Fix a bug within LocalAttachmentHandler and regex search returning None causing AttributeError & add html meta tags to transcript #111

Closed doluk closed 5 months ago

doluk commented 6 months ago

In very raw cases the local attachment handler didn't produce unique (enough) filenames for attachements causing later attachments to overwrite previously stored. By replacing the epoch timestamp with an UUID v4, this is prevented and deals even with multiple transcripts at the same time being generated.

This PR also fixes #109 where re.search finds no match and is returning None. This lead to AttributeErrors.

Lastly this PR adds html meta tags to the base.html to enable link preview in various cases.