Skip to content

Commit

Permalink
feat(args): add ArgsJSON type
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Aug 26, 2022
1 parent 77f5ed4 commit b578d54
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib/parsers/Args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}

Expand Down Expand Up @@ -691,6 +691,12 @@ export class Args {
}
}

export interface ArgsJson {
message: Message<boolean>;
command: MessageCommand;
commandContext: MessageCommand.RunContext;
}

export interface ArgType {
boolean: boolean;
channel: ChannelTypes;
Expand Down

0 comments on commit b578d54

Please sign in to comment.