Discord Read State Sync Fixer
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
This script fixes Discord's read state synchronization issues. If you've ever experienced the problem where messages remain marked as unread even after you've read them, this script automatically detects and fixes it. When you view a channel, the script monitors messages and marks them as read after they've been visible for a configurable amount of time (default 2 seconds). It also provides a "Mark all channels as read" button to clear unread indicators across all channels. The script works in the background, so you don't have to manually click "Mark as read" or refresh the page. A toggle lets you enable or disable the fix at any time.
WHERE IT RUNS
The script runs on all Discord pages (discord.com/channels/* and discord.com/app*). It works in servers, DMs, and group chats. It supports both desktop and mobile views.
HOW TO USE
After installation, the settings panel appears on the left side of the screen with the gear emoji (⚙️). Open the panel to configure the script:
- The "Enable read state fix" toggle enables or disables the automatic fixing.
- Adjust the "Delay before marking as read (ms)" to control how long after a message becomes visible before it's marked as read.
- Toggle "Mark all channels as read on page load" to automatically clear all unread indicators when you open Discord.
- Click "Mark all channels as read" to manually clear all unread indicators.
- Click "Refresh current channel" to re-scan the current channel for unread messages.
The script works automatically—just use Discord as normal and unread messages will be cleared.
TECHNICAL SECTION — REAL MECHANISM
The script detects Discord pages by checking the URL for discord.com/channels or discord.com/app. It finds unread indicators using selectors like .unread, .unread-indicator, .channel-unread, and .mention. For channel-level unread indicators, the script finds the channel element and clicks the "Mark as read" button (if present) or clicks the channel itself to mark it as read. For message-level unread indicators in the current channel, the script monitors the message list for elements with .unread, .message-unread, or .mentioned classes. Each unread message is tracked with a timer. When the timer expires (after the configured delay), the message is marked as read by removing the unread classes. The script uses a WeakSet to track processed channels and an object to store message timers. A MutationObserver watches for DOM changes and re-scans when new messages are loaded or the user navigates to a new channel. A setInterval also runs periodically to catch any missed unread messages.
THE PANEL
The settings panel is built with BotGentz's BGPanel component. It is draggable via its header, allowing you to reposition it anywhere on the screen. The panel snaps to the left edge by default but can be moved freely. Click the gear emoji to collapse the panel into a small bubble, and click the bubble to expand it again. The panel remembers its position per page session. Press the Escape key to quickly close or minimize the panel. The panel includes a status flash bar that provides visual feedback when settings are changed or actions are performed. All settings save automatically via GM_setValue.
PLEASE NOTE
This script requires the free BotGentz browser extension to run. It does not function as a standalone Chrome extension and does not use chrome.* APIs. Discord frequently updates its interface, which may affect the selectors used to find unread indicators and messages. If the script stops working, please check for updates. The script marks messages as read by removing unread classes—this is a visual fix and does not send read receipts to Discord's servers. The "Mark all channels as read" button clicks the native Discord "Mark as read" buttons, which does send read receipts. The script stores only your preferences via GM_setValue. No data is sent externally—all data is stored locally in your browser. The script never reads or writes password fields, hidden inputs, or file inputs. All DOM operations use safe methods (style properties, textContent, appendChild) and never use innerHTML.