mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
Update src/rest/run_method.ts
Co-authored-by: ayntee <ayyantee@gmail.com>
This commit is contained in:
@@ -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 (
|
||||||
|
|||||||
Reference in New Issue
Block a user