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

[BUG] sern Queueing/Awaiting commands #332

Closed
Benzo-Fury opened this issue Oct 6, 2023 · 2 comments · Fixed by #333
Closed

[BUG] sern Queueing/Awaiting commands #332

Benzo-Fury opened this issue Oct 6, 2023 · 2 comments · Fixed by #333
Assignees
Labels
state: Further Investigation Extra attention is needed work: Complex Further work needed

Comments

@Benzo-Fury
Copy link
Contributor

Describe the bug

sern is currently queuing commands when they have been received.

To Reproduce

Steps to reproduce the behavior:

  1. Create a command that first defers the reply and waits any amount of time over 3 seconds before responding.
  2. Click on use another command while the new test one is "thinking" (deffered).
  3. See that the second command comes up as interaction failed and gives a "Unknown Interaction" error.
    (For a better example of the commands used see "Additional Notes" below)

Expected behavior

sern handler should not await/queue commands and should instead synchronous behaviour, executing multiple commands at the same type.

Versioning

NodeJS version: 18.14.2
DiscordJS version: 14.13.0
SernHandler version: 3.0.3 (but same outcome on 3.1)

Additional Notes

Better Example:
User uses /test

await interaction.deferReply();
//do some stuff that takes longer than 3 seconds
await interaction.editReply('Ok dawg');

While /test has been deferred and not yet responded, a user uses /ping.

//sern stream awaits for the /test command to resolve/finish before running this one.
await interaction.reply(`Ping is ${client.ws.ping}`);
//discord.js throws an api error because this command has taken to long to respond^.
@jacoobes jacoobes added state: Further Investigation Extra attention is needed work: Complex Further work needed labels Oct 6, 2023
@Murtatrxx
Copy link
Member

🧐

@jacoobes
Copy link
Member

jacoobes commented Oct 7, 2023

references #333

@jacoobes jacoobes linked a pull request Oct 9, 2023 that will close this issue
jacoobes added a commit that referenced this issue Nov 6, 2023
fix: queuing events

Co-authored-by: Jacob Nguyen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: Further Investigation Extra attention is needed work: Complex Further work needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants