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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user