From 7743366431c4e6224fb004e4ce8ccb3ae6506a8d Mon Sep 17 00:00:00 2001 From: bsian03 Date: Wed, 17 Nov 2021 03:56:12 +0000 Subject: [PATCH] fix(rest): combine routes for GET /guilds/:id/channels (#1287) --- lib/rest/RequestHandler.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rest/RequestHandler.js b/lib/rest/RequestHandler.js index 25a1f5165..ba5ebc76c 100644 --- a/lib/rest/RequestHandler.js +++ b/lib/rest/RequestHandler.js @@ -406,6 +406,8 @@ class RequestHandler { method += "_NEW"; } route = method + route; + } else if(method === "GET" && /\/guilds\/[0-9]+\/channels$/.test(route)) { + route = "/guilds/:id/channels"; } if(method === "PUT" || method === "DELETE") { const index = route.indexOf("/reactions");