zumito-framework 1.6.4 → 1.6.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.
@@ -179,7 +179,7 @@ export declare abstract class Command {
179
179
  * @name type
180
180
  * @description The type of the command. This is used to determine how the command should be executed.
181
181
  * @type {CommandType}
182
- * @default CommandType.prefix
182
+ * @default CommandType.any
183
183
  * @example
184
184
  * ```ts
185
185
  * export class PingCommand extends Command {
@@ -177,7 +177,7 @@ export class Command {
177
177
  * @name type
178
178
  * @description The type of the command. This is used to determine how the command should be executed.
179
179
  * @type {CommandType}
180
- * @default CommandType.prefix
180
+ * @default CommandType.any
181
181
  * @example
182
182
  * ```ts
183
183
  * export class PingCommand extends Command {
@@ -198,7 +198,7 @@ export class Command {
198
198
  * ```
199
199
  * @see {@link CommandType}
200
200
  */
201
- type = CommandType.prefix;
201
+ type = CommandType.any;
202
202
  parent;
203
203
  binds;
204
204
  async executePrefixCommand({ message, args, client, framework, trans, }) {
@@ -89,11 +89,12 @@ export class ErrorHandler {
89
89
  if (!codeFragment && functionName?.includes('.execute')) {
90
90
  let columnEnd = -1;
91
91
  if (lastStack) {
92
- if (lastStack.getFunctionName().contains('.')) {
93
- columnEnd = lastStack.getFunctionName().split('.').at(-1).length;
92
+ const lastFunctionName = lastStack.getFunctionName();
93
+ if (lastFunctionName.includes('.')) {
94
+ columnEnd = lastFunctionName.split('.').at(-1).length;
94
95
  }
95
96
  else {
96
- columnEnd = lastStack.getFunctionName().length;
97
+ columnEnd = lastFunctionName.length;
97
98
  }
98
99
  }
99
100
  codeFragment = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zumito-framework",
3
- "version": "1.6.4",
3
+ "version": "1.6.6",
4
4
  "description": "Discord.js bot framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",