Add a live status line to the stats panel

Shows what's happening right now underneath the table (connecting,
resolving the friend, discovering targets, fetching channel history,
waiting out a jittered delay before reacting, sending a reaction,
removing a reaction during --undo, etc). Status updates are cheap
and DB-free, using the last fetched stats for re-rendering.
This commit is contained in:
2026-08-01 18:53:48 +02:00
parent ab0afa149a
commit 7b3c358b05
5 changed files with 57 additions and 11 deletions

View File

@@ -46,8 +46,14 @@ async def react_to_message(
if already_reacted:
return False
await asyncio.sleep(human_jitter())
chan_label = getattr(message.channel, "name", None) or target.name
delay = human_jitter()
if display is not None:
display.set_status(f"Waiting {delay:.1f}s before reacting in {chan_label}...")
await asyncio.sleep(delay)
if display is not None:
display.set_status(f"Sending reaction in {chan_label}...")
try:
await message.add_reaction(emoji)
except discord.HTTPException: