sh0ckR6 / role-colors

Discord Bot for adding custom role colors
MIT License
0 stars 0 forks source link

[BUG] - Old interactables fail after running new command #4

Open sh0ckR6 opened 3 years ago

sh0ckR6 commented 3 years ago

Bug Report

Checklist

*not required, but it would help!

Steps to reproduce

  1. Run a command that produces interactables as a response
  2. Run the same command again
  3. Use the interactables on the old response

    Expected behavior The old response's interactables should still work as well as the new ones


Actual behavior The old response's interactables no longer work, only the new ones


Stacktrace

N/A
sh0ckR6 commented 3 years ago

I've already looked at the cause of this, I'm just writing an issue so that I don't forget to fix it

Cause

There is only one Command object per Slash Command, and on every execution the old replyMessage variable gets replaced with the new message sent. Interaction execution is based on the replyMessage variable to prevent all Slash Commands handling each other's component interactions; however, it does not take into account the old replyMessages

Potential fix