Remove post-reaction verification refetch

Was doing an extra fetch_message per reaction to confirm the
reaction stuck. Turned out to be unrelated to the earlier
missing-reactions bug (that was the scan-state resume issue), so
drop it to save the API calls.
This commit is contained in:
2026-08-01 18:12:17 +02:00
parent 5d3cc49af0
commit 41b6b3f234
4 changed files with 3 additions and 21 deletions

View File

@@ -26,7 +26,6 @@ async def react_to_message(
emoji: str,
source: str,
display: Optional[StatsDisplay] = None,
verify: bool = True,
) -> bool:
if message.author.id != friend_id:
return False
@@ -47,20 +46,6 @@ async def react_to_message(
log.exception("Failed to react to message %s in channel %s", message.id, message.channel.id)
return False
if verify:
try:
refetched = await message.channel.fetch_message(message.id)
confirmed = any(r.me and str(r.emoji) == emoji for r in refetched.reactions)
except discord.HTTPException:
confirmed = None # couldn't verify either way; don't block on it
if confirmed is False:
log.warning(
"Reaction API call succeeded but is NOT visible on refetch! "
"message=%s channel=%s target=%s (%s) url=%s",
message.id, message.channel.id, target.name, target.target_type, message.jump_url,
)
inserted = await asyncio.to_thread(
storage.record_reaction,
message.id,