@satorijs/adapter-discord 3.2.3 → 3.2.4
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/lib/index.js +8 -2
- package/lib/index.js.map +3 -3
- package/package.json +1 -5
package/lib/index.js
CHANGED
|
@@ -206,7 +206,13 @@ var import_fs = require("fs");
|
|
|
206
206
|
var import_path = require("path");
|
|
207
207
|
var import_file_type = require("file-type");
|
|
208
208
|
var import_form_data = __toESM(require("form-data"));
|
|
209
|
-
var
|
|
209
|
+
var AggregateError = class extends Error {
|
|
210
|
+
constructor(errors, message = "") {
|
|
211
|
+
super(message);
|
|
212
|
+
this.errors = errors;
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
__name(AggregateError, "AggregateError");
|
|
210
216
|
var Sender = class {
|
|
211
217
|
constructor(bot, url) {
|
|
212
218
|
this.bot = bot;
|
|
@@ -346,7 +352,7 @@ var Sender = class {
|
|
|
346
352
|
await this.sendMessage(elements);
|
|
347
353
|
if (!this.errors.length)
|
|
348
354
|
return this.results;
|
|
349
|
-
throw new
|
|
355
|
+
throw new AggregateError(this.errors);
|
|
350
356
|
}
|
|
351
357
|
};
|
|
352
358
|
__name(Sender, "Sender");
|