From 12cd0f7430d05d4ce1d246ad663f1a2f9871319d Mon Sep 17 00:00:00 2001 From: ITOH <72305210+itohatweb@users.noreply.github.com> Date: Wed, 7 Apr 2021 10:46:14 +0200 Subject: [PATCH] Update src/rest/run_method.ts Co-authored-by: ayntee --- src/rest/run_method.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rest/run_method.ts b/src/rest/run_method.ts index 11c40512d..2ce3d0144 100644 --- a/src/rest/run_method.ts +++ b/src/rest/run_method.ts @@ -94,7 +94,7 @@ export function runMethod( await rest.handleStatusCode(response, errorStack); // Sometimes Discord returns an empty 204 response that can't be made to JSON. - if (response.status === 204) return resolve(undefined as unknown as T); + if (response.status === 204) return resolve(undefined); const json = await response.json(); if (