@went.tf/discord-bot-framework 2.9.1 → 2.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -563,6 +563,24 @@ Off by default, and deliberately stops at those fields - it never logs the
563
563
  parsed interaction body itself (command names, option values, user data), so
564
564
  it's safe to leave on for an investigation without a separate opt-out plan.
565
565
 
566
+ One recurring rejection is expected and muted automatically: Discord itself
567
+ periodically sends a `Ping` deliberately signed with an invalid signature
568
+ (seemingly to verify endpoints actually reject bad signatures, rather than
569
+ trusting anything that looks like a Discord request) -
570
+ `isDiscordSignatureConformanceCheck` recognizes it by shape (its `type` and
571
+ Discord's own official system user, not a fixed size) and
572
+ `handleWebhookInteractionRequest` mutes just its `warn`/`debug` logs for that
573
+ one request; the rejection itself is unchanged either way. On by default -
574
+ pass `muteKnownConformanceCheckLogs: false` to always log every rejection, or
575
+ `applicationId: env.DISCORD_CLIENT_ID` to narrow the match further:
576
+
577
+ ```ts
578
+ await handleWebhookInteractionRequest(
579
+ { signature, timestamp, rawBody, headers },
580
+ { publicKey: env.DISCORD_PUBLIC_KEY, logger, onInteraction, applicationId: env.DISCORD_CLIENT_ID },
581
+ );
582
+ ```
583
+
566
584
  `createWebhookInteractionResponder` gives you the REST calls needed *after*
567
585
  that initial response — editing a deferred reply, sending a follow-up, or
568
586
  deleting the reply — built on `@discordjs/rest` (already a peer dependency):