Interaction already acknowledged when using two interactable messages
See original GitHub issueDescribe the bug
I have a simple /test
command, that creates a simple message with a few buttons and a select menu.
I have a simple collector used by that command, that calls interaction.update() on the original message whenever any button is interacted with.
If I only run /test
once, everything works fine.
However, if I run /test
twice, without closing the collector in between (and hence have two messages that i’m supposed to collect from), any interaction with any of the collected messages (or any other one left from previous builds for that matter), will cause both collectors to receive the same interaction, meaning that the second one will throw:
DiscordAPIError[40060]: Interaction has already been acknowledged
error to be thrown
To Reproduce Steps to reproduce the behavior:
- run
/test
- run
/test
again - click any button on any interactable message
- “interaction has already been acknowledged” error is thrown
Expected behavior No double-creation of collectors. Or if they are doubly created, then a way to distinguish them between their target messages.
Desktop (please complete the following information):
- OS: Windows 11
- Browser: N/A
- Version: 4.3.0 discord-nestjs
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:8 (1 by maintainers)
Top GitHub Comments
Hey, sorry I don’t want to hijack this thread, but I think it shows that a more complete example would be helpful and I think the reproduction is related to what I am requesting here: https://github.com/fjodor-rybakov/discord-nestjs/issues/869
@OdedItkinOW thanks for showing some example code with a MenuBuilder 😉
I’m still looking at the source code, I’ll see about notifying you if and when I do start working on the pr.
As for the other question, I can answer that, but that’s off-topic for the issue, so I’d rather move it somewhere else to avoid clutter