@dereekb/discord 13.43.0 → 14.0.1

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/index.esm.js CHANGED
@@ -10,9 +10,7 @@ function _define_property$1(obj, key, value) {
10
10
  configurable: true,
11
11
  writable: true
12
12
  });
13
- } else {
14
- obj[key] = value;
15
- }
13
+ } else obj[key] = value;
16
14
  return obj;
17
15
  }
18
16
  function _object_spread(target) {
@@ -40,9 +38,8 @@ function ownKeys(object, enumerableOnly) {
40
38
  }
41
39
  function _object_spread_props(target, source) {
42
40
  source = source != null ? source : {};
43
- if (Object.getOwnPropertyDescriptors) {
44
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
45
- } else {
41
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
42
+ else {
46
43
  ownKeys(Object(source)).forEach(function(key) {
47
44
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
48
45
  });
@@ -347,9 +344,7 @@ function _object_spread_props(target, source) {
347
344
  }
348
345
 
349
346
  function _assert_this_initialized(self) {
350
- if (self === void 0) {
351
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
352
- }
347
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
353
348
  return self;
354
349
  }
355
350
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
@@ -360,11 +355,8 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
360
355
  reject(error);
361
356
  return;
362
357
  }
363
- if (info.done) {
364
- resolve(value);
365
- } else {
366
- Promise.resolve(value).then(_next, _throw);
367
- }
358
+ if (info.done) resolve(value);
359
+ else Promise.resolve(value).then(_next, _throw);
368
360
  }
369
361
  function _async_to_generator(fn) {
370
362
  return function() {
@@ -386,9 +378,7 @@ function _call_super(_this, derived, args) {
386
378
  return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
387
379
  }
388
380
  function _class_call_check(instance, Constructor) {
389
- if (!(instance instanceof Constructor)) {
390
- throw new TypeError("Cannot call a class as a function");
391
- }
381
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
392
382
  }
393
383
  function _defineProperties(target, props) {
394
384
  for(var i = 0; i < props.length; i++){
@@ -411,9 +401,7 @@ function _define_property(obj, key, value) {
411
401
  configurable: true,
412
402
  writable: true
413
403
  });
414
- } else {
415
- obj[key] = value;
416
- }
404
+ } else obj[key] = value;
417
405
  return obj;
418
406
  }
419
407
  function _get_prototype_of(o) {
@@ -439,14 +427,18 @@ function _instanceof(left, right) {
439
427
  "@swc/helpers - instanceof";
440
428
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
441
429
  return !!right[Symbol.hasInstance](left);
442
- } else {
443
- return left instanceof right;
444
- }
430
+ } else return left instanceof right;
431
+ }
432
+ function _is_native_reflect_construct() {
433
+ try {
434
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
435
+ } catch (_) {}
436
+ return (_is_native_reflect_construct = function() {
437
+ return !!result;
438
+ })();
445
439
  }
446
440
  function _possible_constructor_return(self, call) {
447
- if (call && (_type_of(call) === "object" || typeof call === "function")) {
448
- return call;
449
- }
441
+ if (call && (_type_of(call) === "object" || typeof call === "function")) return call;
450
442
  return _assert_this_initialized(self);
451
443
  }
452
444
  function _set_prototype_of(o, p) {
@@ -456,18 +448,6 @@ function _set_prototype_of(o, p) {
456
448
  };
457
449
  return _set_prototype_of(o, p);
458
450
  }
459
- function _type_of(obj) {
460
- "@swc/helpers - typeof";
461
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
462
- }
463
- function _is_native_reflect_construct() {
464
- try {
465
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
466
- } catch (_) {}
467
- return (_is_native_reflect_construct = function() {
468
- return !!result;
469
- })();
470
- }
471
451
  function _ts_generator(thisArg, body) {
472
452
  var f, y, t, _ = {
473
453
  label: 0,
@@ -567,6 +547,10 @@ function _ts_generator(thisArg, body) {
567
547
  };
568
548
  }
569
549
  }
550
+ function _type_of(obj) {
551
+ "@swc/helpers - typeof";
552
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
553
+ }
570
554
  /**
571
555
  * Error code returned when a code or refresh token is invalid, expired, or was already spent.
572
556
  */ var DISCORD_OAUTH_INVALID_GRANT_ERROR_CODE = 'invalid_grant';
@@ -27,9 +27,7 @@ typeof SuppressedError === "function" ? SuppressedError : function(error, suppre
27
27
  };
28
28
 
29
29
  function _class_call_check$8(instance, Constructor) {
30
- if (!(instance instanceof Constructor)) {
31
- throw new TypeError("Cannot call a class as a function");
32
- }
30
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
33
31
  }
34
32
  function _defineProperties$6(target, props) {
35
33
  for(var i = 0; i < props.length; i++){
@@ -52,9 +50,7 @@ function _define_property$7(obj, key, value) {
52
50
  configurable: true,
53
51
  writable: true
54
52
  });
55
- } else {
56
- obj[key] = value;
57
- }
53
+ } else obj[key] = value;
58
54
  return obj;
59
55
  }
60
56
  /**
@@ -120,11 +116,8 @@ function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
120
116
  reject(error);
121
117
  return;
122
118
  }
123
- if (info.done) {
124
- resolve(value);
125
- } else {
126
- Promise.resolve(value).then(_next, _throw);
127
- }
119
+ if (info.done) resolve(value);
120
+ else Promise.resolve(value).then(_next, _throw);
128
121
  }
129
122
  function _async_to_generator$4(fn) {
130
123
  return function() {
@@ -142,9 +135,7 @@ function _async_to_generator$4(fn) {
142
135
  };
143
136
  }
144
137
  function _class_call_check$7(instance, Constructor) {
145
- if (!(instance instanceof Constructor)) {
146
- throw new TypeError("Cannot call a class as a function");
147
- }
138
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
148
139
  }
149
140
  function _defineProperties$5(target, props) {
150
141
  for(var i = 0; i < props.length; i++){
@@ -167,18 +158,14 @@ function _define_property$6(obj, key, value) {
167
158
  configurable: true,
168
159
  writable: true
169
160
  });
170
- } else {
171
- obj[key] = value;
172
- }
161
+ } else obj[key] = value;
173
162
  return obj;
174
163
  }
175
164
  function _instanceof(left, right) {
176
165
  "@swc/helpers - instanceof";
177
166
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
178
167
  return !!right[Symbol.hasInstance](left);
179
- } else {
180
- return left instanceof right;
181
- }
168
+ } else return left instanceof right;
182
169
  }
183
170
  function _object_spread$2(target) {
184
171
  for(var i = 1; i < arguments.length; i++){
@@ -439,9 +426,7 @@ DiscordApi = __decorate([
439
426
  ], DiscordApi);
440
427
 
441
428
  function _class_call_check$6(instance, Constructor) {
442
- if (!(instance instanceof Constructor)) {
443
- throw new TypeError("Cannot call a class as a function");
444
- }
429
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
445
430
  }
446
431
  /**
447
432
  * Factory that creates a DiscordServiceConfig from environment variables.
@@ -500,10 +485,12 @@ function _array_without_holes$1(arr) {
500
485
  if (Array.isArray(arr)) return _array_like_to_array$1(arr);
501
486
  }
502
487
  function _iterable_to_array$1(iter) {
503
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
488
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
489
+ return Array.from(iter);
490
+ }
504
491
  }
505
492
  function _non_iterable_spread$1() {
506
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
493
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
507
494
  }
508
495
  function _to_consumable_array$1(arr) {
509
496
  return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread$1();
@@ -551,9 +538,7 @@ function _unsupported_iterable_to_array$1(o, minLen) {
551
538
  }
552
539
 
553
540
  function _class_call_check$5(instance, Constructor) {
554
- if (!(instance instanceof Constructor)) {
555
- throw new TypeError("Cannot call a class as a function");
556
- }
541
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
557
542
  }
558
543
  function _defineProperties$4(target, props) {
559
544
  for(var i = 0; i < props.length; i++){
@@ -576,9 +561,7 @@ function _define_property$5(obj, key, value) {
576
561
  configurable: true,
577
562
  writable: true
578
563
  });
579
- } else {
580
- obj[key] = value;
581
- }
564
+ } else obj[key] = value;
582
565
  return obj;
583
566
  }
584
567
  var DISCORD_SERVICE_NAME = 'discord';
@@ -667,11 +650,8 @@ function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
667
650
  reject(error);
668
651
  return;
669
652
  }
670
- if (info.done) {
671
- resolve(value);
672
- } else {
673
- Promise.resolve(value).then(_next, _throw);
674
- }
653
+ if (info.done) resolve(value);
654
+ else Promise.resolve(value).then(_next, _throw);
675
655
  }
676
656
  function _async_to_generator$3(fn) {
677
657
  return function() {
@@ -689,9 +669,7 @@ function _async_to_generator$3(fn) {
689
669
  };
690
670
  }
691
671
  function _class_call_check$4(instance, Constructor) {
692
- if (!(instance instanceof Constructor)) {
693
- throw new TypeError("Cannot call a class as a function");
694
- }
672
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
695
673
  }
696
674
  function _defineProperties$3(target, props) {
697
675
  for(var i = 0; i < props.length; i++){
@@ -714,9 +692,7 @@ function _define_property$4(obj, key, value) {
714
692
  configurable: true,
715
693
  writable: true
716
694
  });
717
- } else {
718
- obj[key] = value;
719
- }
695
+ } else obj[key] = value;
720
696
  return obj;
721
697
  }
722
698
  function _object_spread$1(target) {
@@ -744,9 +720,8 @@ function ownKeys$1(object, enumerableOnly) {
744
720
  }
745
721
  function _object_spread_props$1(target, source) {
746
722
  source = source != null ? source : {};
747
- if (Object.getOwnPropertyDescriptors) {
748
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
749
- } else {
723
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
724
+ else {
750
725
  ownKeys$1(Object(source)).forEach(function(key) {
751
726
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
752
727
  });
@@ -1018,10 +993,12 @@ function _array_without_holes(arr) {
1018
993
  if (Array.isArray(arr)) return _array_like_to_array(arr);
1019
994
  }
1020
995
  function _iterable_to_array(iter) {
1021
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
996
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
997
+ return Array.from(iter);
998
+ }
1022
999
  }
1023
1000
  function _non_iterable_spread() {
1024
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1001
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1025
1002
  }
1026
1003
  function _to_consumable_array(arr) {
1027
1004
  return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
@@ -1073,9 +1050,7 @@ function _define_property$3(obj, key, value) {
1073
1050
  configurable: true,
1074
1051
  writable: true
1075
1052
  });
1076
- } else {
1077
- obj[key] = value;
1078
- }
1053
+ } else obj[key] = value;
1079
1054
  return obj;
1080
1055
  }
1081
1056
  function _object_spread(target) {
@@ -1103,9 +1078,8 @@ function ownKeys(object, enumerableOnly) {
1103
1078
  }
1104
1079
  function _object_spread_props(target, source) {
1105
1080
  source = source != null ? source : {};
1106
- if (Object.getOwnPropertyDescriptors) {
1107
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1108
- } else {
1081
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1082
+ else {
1109
1083
  ownKeys(Object(source)).forEach(function(key) {
1110
1084
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1111
1085
  });
@@ -1137,9 +1111,7 @@ var discordInteractionHandlerConfigurerFactory = handlerConfigurerFactory({
1137
1111
  });
1138
1112
 
1139
1113
  function _class_call_check$3(instance, Constructor) {
1140
- if (!(instance instanceof Constructor)) {
1141
- throw new TypeError("Cannot call a class as a function");
1142
- }
1114
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
1143
1115
  }
1144
1116
  function _defineProperties$2(target, props) {
1145
1117
  for(var i = 0; i < props.length; i++){
@@ -1162,9 +1134,7 @@ function _define_property$2(obj, key, value) {
1162
1134
  configurable: true,
1163
1135
  writable: true
1164
1136
  });
1165
- } else {
1166
- obj[key] = value;
1167
- }
1137
+ } else obj[key] = value;
1168
1138
  return obj;
1169
1139
  }
1170
1140
  /**
@@ -1208,11 +1178,8 @@ function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
1208
1178
  reject(error);
1209
1179
  return;
1210
1180
  }
1211
- if (info.done) {
1212
- resolve(value);
1213
- } else {
1214
- Promise.resolve(value).then(_next, _throw);
1215
- }
1181
+ if (info.done) resolve(value);
1182
+ else Promise.resolve(value).then(_next, _throw);
1216
1183
  }
1217
1184
  function _async_to_generator$2(fn) {
1218
1185
  return function() {
@@ -1411,11 +1378,8 @@ function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) {
1411
1378
  reject(error);
1412
1379
  return;
1413
1380
  }
1414
- if (info.done) {
1415
- resolve(value);
1416
- } else {
1417
- Promise.resolve(value).then(_next, _throw);
1418
- }
1381
+ if (info.done) resolve(value);
1382
+ else Promise.resolve(value).then(_next, _throw);
1419
1383
  }
1420
1384
  function _async_to_generator$1(fn) {
1421
1385
  return function() {
@@ -1433,9 +1397,7 @@ function _async_to_generator$1(fn) {
1433
1397
  };
1434
1398
  }
1435
1399
  function _class_call_check$2(instance, Constructor) {
1436
- if (!(instance instanceof Constructor)) {
1437
- throw new TypeError("Cannot call a class as a function");
1438
- }
1400
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
1439
1401
  }
1440
1402
  function _defineProperties$1(target, props) {
1441
1403
  for(var i = 0; i < props.length; i++){
@@ -1458,9 +1420,7 @@ function _define_property$1(obj, key, value) {
1458
1420
  configurable: true,
1459
1421
  writable: true
1460
1422
  });
1461
- } else {
1462
- obj[key] = value;
1463
- }
1423
+ } else obj[key] = value;
1464
1424
  return obj;
1465
1425
  }
1466
1426
  function _ts_generator$1(thisArg, body) {
@@ -1659,11 +1619,8 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
1659
1619
  reject(error);
1660
1620
  return;
1661
1621
  }
1662
- if (info.done) {
1663
- resolve(value);
1664
- } else {
1665
- Promise.resolve(value).then(_next, _throw);
1666
- }
1622
+ if (info.done) resolve(value);
1623
+ else Promise.resolve(value).then(_next, _throw);
1667
1624
  }
1668
1625
  function _async_to_generator(fn) {
1669
1626
  return function() {
@@ -1681,9 +1638,7 @@ function _async_to_generator(fn) {
1681
1638
  };
1682
1639
  }
1683
1640
  function _class_call_check$1(instance, Constructor) {
1684
- if (!(instance instanceof Constructor)) {
1685
- throw new TypeError("Cannot call a class as a function");
1686
- }
1641
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
1687
1642
  }
1688
1643
  function _defineProperties(target, props) {
1689
1644
  for(var i = 0; i < props.length; i++){
@@ -1706,9 +1661,7 @@ function _define_property(obj, key, value) {
1706
1661
  configurable: true,
1707
1662
  writable: true
1708
1663
  });
1709
- } else {
1710
- obj[key] = value;
1711
- }
1664
+ } else obj[key] = value;
1712
1665
  return obj;
1713
1666
  }
1714
1667
  function _ts_generator(thisArg, body) {
@@ -1852,9 +1805,7 @@ DiscordWebhookController = __decorate([
1852
1805
  ], DiscordWebhookController);
1853
1806
 
1854
1807
  function _class_call_check(instance, Constructor) {
1855
- if (!(instance instanceof Constructor)) {
1856
- throw new TypeError("Cannot call a class as a function");
1857
- }
1808
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
1858
1809
  }
1859
1810
  /**
1860
1811
  * Factory that creates a DiscordWebhookServiceConfig from environment variables.
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@dereekb/discord/nestjs",
3
- "version": "13.43.0",
3
+ "version": "14.0.1",
4
4
  "type": "module",
5
5
  "peerDependencies": {
6
- "@dereekb/discord": "13.43.0",
7
- "@dereekb/nestjs": "13.43.0",
8
- "@dereekb/rxjs": "13.43.0",
9
- "@dereekb/util": "13.43.0",
10
- "@nestjs/common": "^11.1.19",
11
- "@nestjs/config": "^4.0.4",
6
+ "@dereekb/discord": "14.0.1",
7
+ "@dereekb/nestjs": "14.0.1",
8
+ "@dereekb/rxjs": "14.0.1",
9
+ "@dereekb/util": "14.0.1",
10
+ "@nestjs/common": "^12.0.1",
11
+ "@nestjs/config": "^12.0.0",
12
12
  "discord.js": "^14.26.3",
13
13
  "express": "^5.2.1"
14
14
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/discord",
3
- "version": "13.43.0",
3
+ "version": "14.0.1",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -17,11 +17,11 @@
17
17
  }
18
18
  },
19
19
  "peerDependencies": {
20
- "@dereekb/nestjs": "13.43.0",
21
- "@dereekb/rxjs": "13.43.0",
22
- "@dereekb/util": "13.43.0",
23
- "@nestjs/common": "^11.1.19",
24
- "@nestjs/config": "^4.0.4",
20
+ "@dereekb/nestjs": "14.0.1",
21
+ "@dereekb/rxjs": "14.0.1",
22
+ "@dereekb/util": "14.0.1",
23
+ "@nestjs/common": "^12.0.1",
24
+ "@nestjs/config": "^12.0.0",
25
25
  "discord.js": "^14.26.3",
26
26
  "express": "^5.2.1",
27
27
  "make-error": "^1.3.6"