@ovencord/rest 2.5.4 → 2.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/lib/REST.ts
CHANGED
|
@@ -385,7 +385,7 @@ export class REST extends AsyncEventEmitter<RestEvents> {
|
|
|
385
385
|
// eslint-disable-next-line no-eq-null, eqeqeq
|
|
386
386
|
} else if (request.body != null) {
|
|
387
387
|
if (request.passThroughBody) {
|
|
388
|
-
finalBody = request.body as
|
|
388
|
+
finalBody = request.body as any;
|
|
389
389
|
} else {
|
|
390
390
|
// Stringify the JSON data
|
|
391
391
|
finalBody = JSON.stringify(request.body, (_, value) =>
|
|
@@ -15,6 +15,7 @@ export const DefaultUserAgent =
|
|
|
15
15
|
export const DefaultUserAgentAppendix = getUserAgentAppendix();
|
|
16
16
|
|
|
17
17
|
export const DefaultRestOptions = {
|
|
18
|
+
// @ts-ignore
|
|
18
19
|
agent: null,
|
|
19
20
|
api: 'https://discord.com/api',
|
|
20
21
|
authPrefix: 'Bot',
|
|
@@ -23,6 +24,7 @@ export const DefaultRestOptions = {
|
|
|
23
24
|
invalidRequestWarningInterval: 0,
|
|
24
25
|
globalRequestsPerSecond: 50,
|
|
25
26
|
offset: 50,
|
|
27
|
+
// @ts-ignore
|
|
26
28
|
rejectOnRateLimit: null,
|
|
27
29
|
retries: 3,
|
|
28
30
|
retryBackoff: 0,
|
package/src/lib/utils/types.ts
CHANGED
|
@@ -313,7 +313,7 @@ export interface RequestData {
|
|
|
313
313
|
* The body to send to this request.
|
|
314
314
|
* If providing as BodyInit, set `passThroughBody: true`
|
|
315
315
|
*/
|
|
316
|
-
body?:
|
|
316
|
+
body?: unknown;
|
|
317
317
|
/**
|
|
318
318
|
* The {@link https://undici.nodejs.org/#/docs/api/Agent | Agent} to use for the request.
|
|
319
319
|
*
|