narrat 2.1.5 → 2.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/narrat.es.js CHANGED
@@ -39369,16 +39369,16 @@ const vY = it.FromOptions({
39369
39369
  { name: "b", type: "number" }
39370
39370
  ], async (t) => {
39371
39371
  const { a: e, b: n } = t.options;
39372
- return (!e || !n) && hn(t, "random command needs two numbers as parameters"), Math.floor(Math.random() * (n - e + 1)) + e;
39372
+ return typeof e != "number" || typeof n != "number" ? (hn(t, "random command needs two numbers as parameters"), 0) : Math.floor(Math.random() * (n - e + 1)) + e;
39373
39373
  }), gY = new it("random_float", [
39374
39374
  { name: "a", type: "number" },
39375
39375
  { name: "b", type: "number" }
39376
39376
  ], async (t) => {
39377
39377
  const { a: e, b: n } = t.options;
39378
- return (!e || !n) && hn(t, "random_float command needs two numbers as parameters"), Math.random() * (n - e) + e;
39378
+ return typeof e != "number" || typeof n != "number" ? (hn(t, "random_float command needs two numbers as parameters"), 0) : Math.random() * (n - e) + e;
39379
39379
  }), yY = new it("random_from_args", [], async (t) => {
39380
39380
  const e = t.args;
39381
- return (!e || !e.length) && hn(t, "random_from_args command needs at least one argument"), e[Math.floor(Math.random() * e.length)];
39381
+ return !e || !e.length ? (hn(t, "random_from_args command needs at least one argument"), 0) : e[Math.floor(Math.random() * e.length)];
39382
39382
  }), bY = new it("concat", "any", async (t) => (t.args.length < 2 && hn(t, "requires at least two arguments"), t.args.reduce((e, n) => typeof n == "string" ? `${e}${n}` : (hn(t, "requires all arguments to be strings"), e), ""))), wY = new it("join", "any", async (t) => {
39383
39383
  const e = t.args[0];
39384
39384
  return t.args.length < 3 && hn(t, "requires at least 3 arguments"), t.args.slice(1).reduce((n, r) => typeof r == "string" ? `${n}${e}${r}` : (hn(t, "requires all arguments to be strings"), n), "");