From e3549a8675d62667b21012cbc1f69a397cd4b5ac Mon Sep 17 00:00:00 2001 From: ITOH Date: Mon, 3 Apr 2023 22:00:30 +0200 Subject: [PATCH] fix(rest): does not need to set the absolute url (#2966) --- packages/rest/src/manager.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/rest/src/manager.ts b/packages/rest/src/manager.ts index d6cb17c51..a42775554 100644 --- a/packages/rest/src/manager.ts +++ b/packages/rest/src/manager.ts @@ -377,15 +377,6 @@ export function createRestManager(options: CreateRestManagerOptions): RestManage }, async processRequest(request: SendRequestOptions) { - const route = request.route.substring(request.route.indexOf('api/')) - const parts = route.split('/') - // Remove the api/ - parts.shift() - // Removes the /v#/ - if (parts[0]?.startsWith('v')) parts.shift() - // Set the full url to discord api in case it was recieved in a proxy rest - request.route = `${rest.baseUrl}/v${rest.version}/${parts.join('/')}` - const url = rest.simplifyUrl(request.route, request.method) if (request.runThroughQueue === false) {