Update src/rest/run_method.ts

Co-authored-by: ayntee <ayyantee@gmail.com>
This commit is contained in:
ITOH
2021-04-07 10:46:14 +02:00
committed by GitHub
parent e21581a6b9
commit 12cd0f7430
+1 -1
View File
@@ -94,7 +94,7 @@ export function runMethod<T = any>(
await rest.handleStatusCode(response, errorStack); await rest.handleStatusCode(response, errorStack);
// Sometimes Discord returns an empty 204 response that can't be made to JSON. // 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(); const json = await response.json();
if ( if (