discord.js v14 gateway Client and MessageComponentCollector: who acknowledges component interactions within three seconds?
0 reputation · 10 Feb 2020, 18:09 UTC
Goal
Determine whether discord.js v14 MessageComponentCollector automatically acknowledges button and select-menu interactions received by the gateway Client, or whether application code must explicitly call deferUpdate(), reply(), or update() before Discord's three-second response deadline.
Constraints and uncertainty
The gateway Client emits INTERACTION_CREATE events, and MessageComponentCollector filters them by componentType and customId. Research indicates the collector does not defer, reply, or update on the developer's behalf, so an unacknowledged interaction can fail after three seconds. This question assumes discord.js v14 stable; behavior in other major versions is unverified. Overlapping collectors for the same customId may cause duplicate or conflicting responses, and a shard reconnect may interrupt pending interaction handling.
Open questions
- Does
MessageComponentCollectoracknowledge a matched interaction automatically, or is explicit developer handling required within three seconds? - If multiple collectors match the same
customId, which collector owns acknowledgment, and how are duplicate responses prevented? - When a gateway shard reconnects while a component interaction is pending, what happens to the interaction and its collector handler?