aikaterna / gobcog

RPG Adventure Cog for Red v3
44 stars 69 forks source link

[Command Bug] Multiple Unknown Interactions for [p]adventure #447

Closed vertyco closed 7 months ago

vertyco commented 10 months ago

Getting 404 Not Found (error code: 10062): Unknown interaction exceptions in the following py files.

Some, but not sure if all of these are resulting in players not getting rewarded experience/gold after an adventure. When the time is up, the results embed never sends.

game_session.py -> send_response

Happens mostly when psychics try to use their special via button, but i do have 3 instances of the attack button causing it.

menus.py -> callback

This occurred from the stats command for a player.

helpers.py -> smart_embed

This occurs when psychic uses their special via the button rather than the command. And also rarely for the attack button.

helpers.py -> putaway_button

Occurs when clicking the putaway button

Complete these first

Command names

[p]stats - for the exception in the menus.py callback function [p]adventure - for the rest of the occurances [p]loot - putaway button specifically

Expected Behavior

The interaction object should be handled if stale? The adventure results embed should come in as intended. The psychic special button to handle the response properly.

Current Behavior

Version: 4.0.4 Players not getting rewarded experience/gold after an adventure. When the time is up, the results embed never sends. A reload fixes this for a while.

Possible Solution

Handle stale/already reacted interactions, maybe use the channel attr from them as a backup and just send to the channel non-ephemerally. I tried forking for a bit and just catching the exceptions where they were happening, but then other unexpected issues started popping up so we reverted to the stock adventure branch. The issue seems to be higher up the logic path somewhere.

Steps to Reproduce

  1. Get a lot of users playing non-stop image
  2. Have psychics use their specials with the button, not sure if all is caused by just psychics though.
  3. Wait for exp/gold payout (or not, the error also occurs if they lost)
  4. Maybe get the result embed, maybe not?

Context (Environment)

I am not sure if it is related, nor do i have any evidence to support this, but one night at the exact moment an adventure failed to resolve and show results, 3 players in that adventure ended up with a few million red credits (not gold) after the game ended. We checked discord audit logs and extendedmodlogs for deleted messages, and looked at all 3 players chat history to find no evidence of them transferring gold to red credits. I havent dug super deep into the code so it could be totally coincidence and another cog is causing it, but just thought i'd point it out.

aikaterna commented 10 months ago

Thank you for this super detailed issue, will try to take a look sometime.