@discordjs/builders 0.16.0-dev.1655770448-94f7ca9 → 0.16.0-dev.1655899432-a3799f9

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 CHANGED
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ "use strict";
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -909,7 +910,6 @@ __export(Assertions_exports5, {
909
910
  validateRequiredParameters: () => validateRequiredParameters3
910
911
  });
911
912
  var import_shapeshift5 = require("@sapphire/shapeshift");
912
- var import_is = __toESM(require("@sindresorhus/is"));
913
913
  var import_v108 = require("discord-api-types/v10");
914
914
  var namePredicate = import_shapeshift5.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/^[\P{Lu}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+$/u);
915
915
  function validateName(name) {
@@ -952,20 +952,7 @@ function validateChoicesLength(amountAdding, choices) {
952
952
  }
953
953
  __name(validateChoicesLength, "validateChoicesLength");
954
954
  function assertReturnOfBuilder(input, ExpectedInstanceOf) {
955
- const instanceName = ExpectedInstanceOf.name;
956
- if (import_is.default.nullOrUndefined(input)) {
957
- throw new TypeError(`Expected to receive a ${instanceName} builder, got ${input === null ? "null" : "undefined"} instead.`);
958
- }
959
- if (import_is.default.primitive(input)) {
960
- throw new TypeError(`Expected to receive a ${instanceName} builder, got a primitive (${typeof input}) instead.`);
961
- }
962
- if (!(input instanceof ExpectedInstanceOf)) {
963
- const casted = input;
964
- const constructorName = import_is.default.function_(input) ? input.name : casted.constructor.name;
965
- const stringTag = Reflect.get(casted, Symbol.toStringTag);
966
- const fullResultName = stringTag ? `${constructorName} [${stringTag}]` : constructorName;
967
- throw new TypeError(`Expected to receive a ${instanceName} builder, got ${fullResultName} instead.`);
968
- }
955
+ import_shapeshift5.s.instance(ExpectedInstanceOf).parse(input);
969
956
  }
970
957
  __name(assertReturnOfBuilder, "assertReturnOfBuilder");
971
958
  var localizationMapPredicate = import_shapeshift5.s.object(Object.fromEntries(Object.values(import_v108.Locale).map((locale) => [locale, import_shapeshift5.s.string.nullish]))).strict.nullish;