From 6675757b61c90d386b3a2a039c8838a38bdd9266 Mon Sep 17 00:00:00 2001 From: MARCROCK22 <57925328+MARCROCK22@users.noreply.github.com> Date: Wed, 24 Apr 2024 19:41:05 -0400 Subject: [PATCH] fix: share same bucket for all interactions callback --- src/api/api.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/api/api.ts b/src/api/api.ts index e40c71b..7ecd770 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -383,6 +383,10 @@ export class ApiHandler { } routefy(url: string, method: HttpMethods): `/${string}` { + if (url.startsWith('/interactions/') && url.endsWith('/callback')) { + return '/interactions/:id/:token/callback'; + } + let route = url .replace(/\/([a-z-]+)\/(?:[0-9]{17,19})/g, (match, p) => p === 'channels' || p === 'guilds' || p === 'webhooks' ? match : `/${p}/:id`,