From b578d54a16b38bc26039c62e4bcffc9285a2e181 Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Tue, 23 Aug 2022 09:04:32 +0200 Subject: [PATCH] feat(args): add `ArgsJSON` type --- src/lib/parsers/Args.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/parsers/Args.ts b/src/lib/parsers/Args.ts index 51866a67d..aea56a06e 100644 --- a/src/lib/parsers/Args.ts +++ b/src/lib/parsers/Args.ts @@ -638,7 +638,7 @@ export class Args { /** * Defines the `JSON.stringify` override. */ - public toJSON() { + public toJSON(): ArgsJson { return { message: this.message, command: this.command, commandContext: this.commandContext }; } @@ -691,6 +691,12 @@ export class Args { } } +export interface ArgsJson { + message: Message; + command: MessageCommand; + commandContext: MessageCommand.RunContext; +} + export interface ArgType { boolean: boolean; channel: ChannelTypes;