bakit 1.0.0-beta.15 → 1.0.0-beta.17

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -3
  2. package/package.json +3 -7
package/dist/index.js CHANGED
@@ -359,8 +359,10 @@ var ArgumentResolver = class _ArgumentResolver {
359
359
  async resolve(entry, at = 1) {
360
360
  let mainHook = entry.hooks.MAIN, args = mainHook ? [...Arg.getMethodArguments(mainHook.method)] : [], nextAt = at;
361
361
  if (args.length) {
362
- let values = this.values.slice(at), parsedValues = args.length >= values.length ? await this.parseExact(args, values) : await this.parseFlexible(args, values);
363
- nextAt += parsedValues.length, this._args.push(...args), this._parsedValues.push(...parsedValues);
362
+ let values = this.values.slice(at);
363
+ this._args.push(...args);
364
+ let parsedValues = values.length >= args.length ? await this.parseExact(args, values) : await this.parseFlexible(args, values);
365
+ nextAt += parsedValues.length, this._parsedValues.push(...parsedValues);
364
366
  }
365
367
  let nextValue = this._values[nextAt];
366
368
  if (!nextValue || !("children" in entry))
@@ -402,6 +404,8 @@ var ArgumentResolver = class _ArgumentResolver {
402
404
  return parsedValues;
403
405
  }
404
406
  async matchValue(arg, value) {
407
+ if (!value)
408
+ return null;
405
409
  switch (arg.type) {
406
410
  case "user" /* User */:
407
411
  return await this.matchUserValue(arg, value);
@@ -740,7 +744,10 @@ var CommandDispatcher = class {
740
744
  context,
741
745
  resolver
742
746
  );
743
- payload && await context.send(payload);
747
+ if (payload) {
748
+ await context.send(payload);
749
+ return;
750
+ }
744
751
  } else
745
752
  throw error;
746
753
  }
package/package.json CHANGED
@@ -1,14 +1,10 @@
1
1
  {
2
2
  "name": "bakit",
3
- "version": "1.0.0-beta.15",
3
+ "version": "1.0.0-beta.17",
4
4
  "description": "A framework for discord.js",
5
5
  "type": "module",
6
- "exports": {
7
- ".": {
8
- "types": "./dist/index.d.ts",
9
- "import": "./dist/index.js"
10
- }
11
- },
6
+ "types": "./dist/index.d.ts",
7
+ "exports": "./dist/index.js",
12
8
  "scripts": {
13
9
  "build": "tsup",
14
10
  "type-check": "tsc --noEmit",