From 17221402258492cb459592c1da9aea37cce8c3bc Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Fri, 29 Jul 2022 19:57:11 +0300 Subject: [PATCH] bugfix? --- package.json | 2 +- src/classes/CommandOption.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index aed7f8a..f44f712 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commandparser", - "version": "1.0.12", + "version": "1.0.13", "description": "Parser meant to parse commands and their options for discord bots", "main": "build/index.js", "author": "Navy.gif", diff --git a/src/classes/CommandOption.ts b/src/classes/CommandOption.ts index 173b9bb..f4eef2b 100644 --- a/src/classes/CommandOption.ts +++ b/src/classes/CommandOption.ts @@ -84,7 +84,7 @@ class CommandOption implements ICommandOption { this.guild = guild; // eslint-disable-next-line @typescript-eslint/ban-types const func = this[OptionType[this.type]] as Function; - const result = await func(); + const result = await func.bind(this)(); return result as ParseResult; }