Discord History Tracker {{{version:web}}} | Release Notes

Discord History Tracker lets you save chat history in your servers, groups, and private conversations, and view it offline.

You can use Discord History Tracker either entirely in your browser, or download a desktop app for Windows / Linux / Mac. While the browser-only method is simpler and works on any device that has a modern web browser, it has significant limitations and fewer features than the app. Please read about both methods below.

Method 1: Browser-Only

A tracking script will load messages according to your settings, and save them in your browser.

Because everything happens in your browser, if the browser tab is closed, or your browser or computer crashes, you will lose all progress. Your browser may also be unable to process large amounts of messages. If this is a concern, use the app method.

Setup the Tracking Script

Option 1: Userscript

Preferred option. Requires a browser addon, but DHT will stay up-to-date and be easily accessible on the Discord website.

  1. Install a userscript manager addon:
    • Violentmonkey (Chrome)
    • Tampermonkey (Firefox, Edge, Chrome, Opera)
    • Due to browser bugs / limitations, DHT will not work in Firefox with Greasemonkey / Violentmonkey, and in Safari at all
  2. Click Install Userscript to prompt an installation into the userscript manager
  3. Open Discord, and view any server, group, or private conversation (it will not appear in Friends list)
  4. Click DHT in the top right corner:

Option 2: Browser / Discord Console

The console is the only way to use DHT directly in the desktop app.

  1. Click Copy to Clipboard to copy the tracking script
  2. Press Ctrl+Shift+I in your browser or the Discord app, and select the Console tab
  3. Paste the script into the console, and press Enter to run it
  4. Press Ctrl+Shift+I again to close the console

Your browser may not support copying to clipboard, please try copying the script manually:

Option 3: Bookmarklet

Requires Firefox 69 or newer.

  1. Right-click " onclick="return false;" onauxclick="return false;">Discord History Tracker
  2. Select «Bookmark This Link» and save the bookmark
  3. Open Discord and click the bookmark to run the script

Old Versions

Whenever DHT is updated to work with a new version of Discord, it may no longer work with the previous version of Discord.

If you haven't received that Discord update yet, see Release Notes for information about recent updates, and Old Versions if you need to use an older version of DHT.

How to Track Messages

When using the script for the first time, you will see a Settings dialog where you can configure the script. These settings will be remembered as long as you don't delete cookies in your browser.

By default, Discord History Tracker is set to automatically scroll up to load the channel history, and pause tracking if it reaches a previously saved message to avoid unnecessary history loading.

Before you Start Tracking, you may use Upload & Combine to load messages from a previously saved archive file into the browser.

When you click Download, the browser will generate an archive file from saved messages, and lets you save it to your computer.

How to View History

First, save the Viewer file to your computer. Then you can open the downloaded viewer in your browser, click Load File, and select the archive to view.

Method 2: Desktop App

The app can be downloaded from GitHub. Every release includes 4 versions available:

The three non-portable versions include an executable named DiscordHistoryTracker you can launch. For the portable version, extract the archive into a folder, open the folder in a terminal and type: dotnet DiscordHistoryTracker.dll

How to Track Messages

The app saves messages into a database file stored on your computer. When you open the app, you are given the option to create a new database file, or open an existing one.

In the Tracking tab, click Copy Tracking Script to generate a tracking script that works similarly to the browser-only version of Discord History Tracker, but instead of saving messages in the browser, the tracking script sends them to the app which saves them in the database file.

Screenshot of the App (Tracker tab)

See Option 2: Browser / Discord Console above for more detailed instructions on how to paste the tracking script into the browser or Discord app console.

When using the script for the first time, you will see a Settings dialog where you can configure the script. These settings will be remembered as long as you don't delete cookies in your browser.

By default, Discord History Tracker is set to automatically scroll up to load the channel history, and pause tracking if it reaches a previously saved message to avoid unnecessary history loading.

How to View History

In the Viewer tab, you can open a viewer in your browser, or save it as a file you can open in your browser later. You also have the option to apply filters to only view a portion of the saved messages.

Screenshot of the App (Viewer tab)

Technical Details

  1. The app uses SQLite, which means that you can use SQL to manually query or manipulate the database file.
  2. The app communicates with the script using an integrated server. The server only listens for local connections (i.e. connections from programs running on your computer, not the internet). When you copy the tracking script, it will contain a randomly generated token that ensures only the tracking script is able to talk to the server.
  3. You can use the -port <p> and -token <t> command line arguments to configure the server manually — otherwise, they will be assigned automatically in a way that allows running multiple separate instances of the app.

External Links