revbot.js 0.1.5 → 0.1.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/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -104,14 +104,14 @@ var _BaseManager = class _BaseManager {
|
|
|
104
104
|
}
|
|
105
105
|
/** Adjust the maximum size for this manager at runtime. */
|
|
106
106
|
setMaxSize(size) {
|
|
107
|
-
if (!Number.isFinite(size) || size <
|
|
107
|
+
if (!Number.isFinite(size) || size < -1)
|
|
108
108
|
throw new RangeError("maxSize must be a non-negative finite number");
|
|
109
109
|
this.maxSize = size;
|
|
110
110
|
this.enforceMaxSize();
|
|
111
111
|
}
|
|
112
112
|
/** Force eviction until cache size is within the limit. */
|
|
113
113
|
enforceMaxSize() {
|
|
114
|
-
if (this.
|
|
114
|
+
if (this.maxSize === -1) return;
|
|
115
115
|
if (this.maxSize === 0) {
|
|
116
116
|
this.cache.clear();
|
|
117
117
|
return;
|
|
@@ -142,7 +142,7 @@ var _BaseManager = class _BaseManager {
|
|
|
142
142
|
}
|
|
143
143
|
};
|
|
144
144
|
/** Shared default max size for all managers (can be changed globally). */
|
|
145
|
-
_BaseManager.defaultMaxSize =
|
|
145
|
+
_BaseManager.defaultMaxSize = -1;
|
|
146
146
|
var BaseManager = _BaseManager;
|
|
147
147
|
|
|
148
148
|
// src/utils/bitField.ts
|
|
@@ -2689,7 +2689,7 @@ import { Readable as Readable2 } from "stream";
|
|
|
2689
2689
|
import FormData2 from "form-data";
|
|
2690
2690
|
import axios2 from "axios";
|
|
2691
2691
|
var MessageManager = class extends BaseManager {
|
|
2692
|
-
constructor(channel, maxSize =
|
|
2692
|
+
constructor(channel, maxSize = 1e3) {
|
|
2693
2693
|
super(channel.client, maxSize);
|
|
2694
2694
|
this.channel = channel;
|
|
2695
2695
|
this.holds = MessageStruct;
|
|
@@ -3199,7 +3199,7 @@ import { EventEmitter } from "node:events";
|
|
|
3199
3199
|
import { AxiosError } from "axios";
|
|
3200
3200
|
|
|
3201
3201
|
// package.json
|
|
3202
|
-
var version = "0.1.
|
|
3202
|
+
var version = "0.1.6";
|
|
3203
3203
|
|
|
3204
3204
|
// src/rest/restUtils/rateLimitQueue.ts
|
|
3205
3205
|
import axios3 from "axios";
|