fix: share same bucket for all interactions callback

This commit is contained in:
MARCROCK22 2024-04-24 19:41:05 -04:00
parent a8380bf07d
commit 6675757b61

View File

@ -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`,