question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Interaction already acknowledged when using two interactable messages

See original GitHub issue

Describe 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:

  1. run /test
  2. run /test again
  3. click any button on any interactable message
  4. “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:open
  • Created a year ago
  • Reactions:1
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Phoscurcommented, Sep 18, 2022

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 😉

0reactions
OdedItkinOWcommented, Sep 18, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Interaction has already been acknowledged - Stack Overflow
Its because you already .reply() -ed to the interaction, so the interaction is already acknowledged with that. To solve this you can use...
Read more >
Interactions - Discord
An Interaction is the message that your application receives when a user uses an application command or a message component. For Slash Commands,...
Read more >
Interactions · DV8FromTheWorld/JDA Wiki - GitHub
This means you need to either reply or deferReply. You only have 3 SECONDS to acknowledge a command. Since some commands may take...
Read more >
Handling user interaction in your Slack apps
We end up with an interaction flow that looks like this: A user triggers an interaction by using one of an app's entry...
Read more >
Interaction Design Basics - Usability.gov
Best Practices for Designing Interactions · What can a user do with their mouse, finger, or stylus to directly interact with the interface?...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found