@discordjs/rest 3.0.0-dev.1791979323-03777df7f → 3.0.0-dev.1793491372-107f61dcb
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/dist/index.js +13 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -11
- package/dist/index.mjs.map +1 -1
- package/dist/web.js +13 -11
- package/dist/web.js.map +1 -1
- package/dist/web.mjs +13 -11
- package/dist/web.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -158,7 +158,7 @@ var import_v102 = require("discord-api-types/v10");
|
|
|
158
158
|
// src/lib/utils/constants.ts
|
|
159
159
|
var import_util = require("@discordjs/util");
|
|
160
160
|
var import_v10 = require("discord-api-types/v10");
|
|
161
|
-
var DefaultUserAgent = `DiscordBot (https://discord.js.org, 3.0.0-dev.
|
|
161
|
+
var DefaultUserAgent = `DiscordBot (https://discord.js.org, 3.0.0-dev.1793491372-107f61dcb)`;
|
|
162
162
|
var DefaultUserAgentAppendix = (0, import_util.getUserAgentAppendix)();
|
|
163
163
|
var DefaultRestOptions = {
|
|
164
164
|
agent: null,
|
|
@@ -1184,16 +1184,18 @@ var SequentialHandler = class {
|
|
|
1184
1184
|
this.remaining = remaining ? Number(remaining) : 1;
|
|
1185
1185
|
this.reset = reset ? Number(reset) * 1e3 + Date.now() + offset : Date.now();
|
|
1186
1186
|
if (retry) retryAfter = Number(retry) * 1e3 + offset;
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
);
|
|
1193
|
-
} else if (hash) {
|
|
1194
|
-
const hashData = this.manager.hashes.get(
|
|
1195
|
-
`${method}:${routeId.bucketRoute}${typeof requestData.auth === "string" ? `:${requestData.auth}` : ""}`
|
|
1187
|
+
const authPartition = typeof requestData.auth === "string" ? `:${requestData.auth}` : "";
|
|
1188
|
+
const partitionedHash = hash && `${hash}${authPartition}`;
|
|
1189
|
+
if (partitionedHash && partitionedHash !== this.hash) {
|
|
1190
|
+
this.debug(
|
|
1191
|
+
["Received bucket hash update", ` Old Hash : ${this.hash}`, ` New Hash : ${partitionedHash}`].join("\n")
|
|
1196
1192
|
);
|
|
1193
|
+
this.manager.hashes.set(`${method}:${routeId.bucketRoute}${authPartition}`, {
|
|
1194
|
+
value: partitionedHash,
|
|
1195
|
+
lastAccess: Date.now()
|
|
1196
|
+
});
|
|
1197
|
+
} else if (partitionedHash) {
|
|
1198
|
+
const hashData = this.manager.hashes.get(`${method}:${routeId.bucketRoute}${authPartition}`);
|
|
1197
1199
|
if (hashData) {
|
|
1198
1200
|
hashData.lastAccess = Date.now();
|
|
1199
1201
|
}
|
|
@@ -1606,7 +1608,7 @@ var REST = class _REST extends import_async_event_emitter.AsyncEventEmitter {
|
|
|
1606
1608
|
};
|
|
1607
1609
|
|
|
1608
1610
|
// src/shared.ts
|
|
1609
|
-
var version = "3.0.0-dev.
|
|
1611
|
+
var version = "3.0.0-dev.1793491372-107f61dcb";
|
|
1610
1612
|
|
|
1611
1613
|
// src/index.ts
|
|
1612
1614
|
setDefaultStrategy((0, import_util2.shouldUseGlobalFetchAndWebSocket)() ? fetch : makeRequest);
|