discord-api-docs icon indicating copy to clipboard operation
discord-api-docs copied to clipboard

`STAGE_INSTANCE_DELETE` is fired twice

Open hampuskraft opened this issue 3 years ago • 3 comments

Description

The STAGE_INSTANCE_DELETE gateway event is fired twice.

Steps to Reproduce

  • Create a Scheduled Event.
  • Start the event.
  • End the event.

Expected Behavior

STAGE_INSTANCE_DELETE should only be sent once.

Current Behavior

STAGE_INSTANCE_DELETE is sent twice.

Screenshots/Videos

https://github.com/discordjs/discord.js/issues/7737#issuecomment-1086610975

Client and System Information

N/A

hampuskraft avatar Apr 05 '22 04:04 hampuskraft

Not a bug but not exactly as designed either. The docs explicitly say there is no guarantee that an event will be reported exactly once.

erkinalp avatar Apr 07 '22 19:04 erkinalp

This indeed is a bug.

hampuskraft avatar Apr 07 '22 19:04 hampuskraft

Discord operates at a scale where true consistency is impossible. Because of this, lots of operations in our API and in-between our services are eventually consistent. Due to this, client actions can never be serialized and may be executed in any order (if executed at all). Along with these constraints, events in Discord may:

  • Never be sent to a client
  • Be sent exactly one time to the client
  • Be sent up to N times per client

erkinalp avatar Apr 07 '22 19:04 erkinalp