Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Unknown Interaction when using commads #658

Open
IsmailAlamKhan opened this issue May 4, 2024 · 6 comments
Open

Getting Unknown Interaction when using commads #658

IsmailAlamKhan opened this issue May 4, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@IsmailAlamKhan
Copy link

Describe the bug
I am trying to make a command the selections work but when trying to respond after selection and an api call I get an error saying
Unknown interaction (10062).

To Reproduce

  1. Create a command.
  2. Add some selection
  3. Make an api call based on those selection
  4. Respond using the fetched image using ChatContext.respond.

Expected behavior
The image should be sent to the server.

Screenshots
Screenshot 2024-05-04 at 3 33 37 PM

Desktop (please complete the following information):

  • OS: MacOS Sonoma 14.4.1
  • Dart version 3.3.2
  • Nyxx version 6.2.1
  • Nyxx Commands version: 6.0.2

Additional context
I think maybe because of the api call the webhook is getting disconnected? But I am not sure about that.

@IsmailAlamKhan IsmailAlamKhan added the bug Something isn't working label May 4, 2024
@IsmailAlamKhan IsmailAlamKhan changed the title Getting Unknown Webhook when using commads Getting Unknown Interaction when using commads May 4, 2024
@IsmailAlamKhan
Copy link
Author

Ok if I respond before after the selection and before the api call the image is successfully sent

@MCausc78
Copy link
Contributor

MCausc78 commented May 4, 2024

"10062/Unknown Interaction" always means that interaction timed out. You have 3 seconds to respond to interaction. For support with nyxx/nyxx_commands you can join our discord guild

@IsmailAlamKhan
Copy link
Author

oh @MCausc78 thanks for letting me know.

@abitofevrything
Copy link
Member

Can you provide more information? As @MCausc78 says, this error is happening because the interaction is timing out - but this shouldn't be an issue here:

  1. If you're using context.getSelection, this is already responding to the interaction
  2. Once the selection is made, the context should be updated to point to the new interaction
  3. nyxx_commands should automatically respond in less than 3 seconds if you don't

So. This shouldn't be happening. Do you perhaps have slow internet? In that case you can try setting CommandOptions.autoAcknowledgeDuration to something like 1 second?

@IsmailAlamKhan
Copy link
Author

So basically get selections are working, after the second selection I make an API call which downloads and image and then I respond with that image. Now its working if I send a respond after the last selection something like please wait the image is being fetched.

@abitofevrything
Copy link
Member

Ok, I think I have an idea of what was going wrong. I'll keep this open for bookmarking - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants