@discordjs/builders 0.16.0-dev.1655770448-94f7ca9 → 0.16.0-dev.1655815532-c6f285b

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
@@ -909,7 +909,6 @@ __export(Assertions_exports5, {
909
909
  validateRequiredParameters: () => validateRequiredParameters3
910
910
  });
911
911
  var import_shapeshift5 = require("@sapphire/shapeshift");
912
- var import_is = __toESM(require("@sindresorhus/is"));
913
912
  var import_v108 = require("discord-api-types/v10");
914
913
  var namePredicate = import_shapeshift5.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/^[\P{Lu}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+$/u);
915
914
  function validateName(name) {
@@ -952,20 +951,7 @@ function validateChoicesLength(amountAdding, choices) {
952
951
  }
953
952
  __name(validateChoicesLength, "validateChoicesLength");
954
953
  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
- }
954
+ import_shapeshift5.s.instance(ExpectedInstanceOf).parse(input);
969
955
  }
970
956
  __name(assertReturnOfBuilder, "assertReturnOfBuilder");
971
957
  var localizationMapPredicate = import_shapeshift5.s.object(Object.fromEntries(Object.values(import_v108.Locale).map((locale) => [locale, import_shapeshift5.s.string.nullish]))).strict.nullish;