Minor update

- feat(Client): redeemNitro & autoRedeemNitro
- fix(Modal): Reply modal bug
- fix(RichPresence): setAssetsImage bug
- refactor(RichPresence): Clean code
This commit is contained in:
March 7th
2022-07-09 19:47:00 +07:00
parent 0df013b2dc
commit 536a86a5f3
14 changed files with 88 additions and 7030 deletions

View File

@@ -346,11 +346,6 @@ class RequestHandler {
} catch (err) {
throw new HTTPError(err.message, err.constructor.name, err.status, request);
}
/**
* If the response code is 10038 or UNKNOWN_GIFT_CODE then return the data object instead of throwing the error. *continues on next line*
* [].includes() adds better scaleability instead of stacking if statements (Yellowy)
*/
if ([10038].includes(data.code)) return data;
throw new DiscordAPIError(data, res.status, request);
}