ab0afa149a68dc529b554e8659fa74916ff3dd86
Split each channel's backlog scan into a find phase (settles the found count first) and a react phase, so the progress display no longer grows both numbers in lockstep. Found messages are logged in a dedicated, message_id-deduped table and recovered across restarts independent of the resume checkpoint, so nothing found is silently abandoned if the script stops mid-react. Also drops the separately-maintained messages_found counter, which proved prone to drift under repeated interruptions/rescans, in favor of computing it live from the dedup table - self-healing regardless of how many times a channel gets rescanned.
dc-nogi
Does the thing
Setup
- Install Python 3.10 or newer.
- Install dependencies:
pip install -r requirements.txt - Copy
config.example.jsontoconfig.jsonand fill in:token: your account token (Discord dev tools -> Network tab -> any request ->authorizationheader, while logged into the Discord web app).friend_id: your friend's numeric Discord user ID (enable Developer Mode in Discord settings, right-click their name -> Copy User ID).emoji: the unicode emoji to react with, e.g."🫄".days_back: how many days of history to scan on first run (default 10).manual_guild_ids(optional): guild IDs to always include, used as a fallback if the mutual-guilds lookup ever fails or misses a server.
- Run it:
python main.py
Usage
python main.py # run normally: backlog scan, then live watching
python main.py --undo # remove every reaction this script has ever added, then exit
Description
Languages
Python
100%