From d435f5cae60a7f62e83bca67eda3ef1674401276 Mon Sep 17 00:00:00 2001 From: samfundev Date: Thu, 14 Mar 2024 11:40:03 -0400 Subject: [PATCH] fix: rename message field to messageOrInteraction --- src/lib/parsers/Args.ts | 2 +- src/lib/parsers/ChatInputCommandArgs.ts | 2 +- src/lib/parsers/MessageArgs.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/parsers/Args.ts b/src/lib/parsers/Args.ts index f1fa2a3f8..b7247a9be 100644 --- a/src/lib/parsers/Args.ts +++ b/src/lib/parsers/Args.ts @@ -90,7 +90,7 @@ export abstract class Args { } export interface ArgsJson { - message: Message | AnyInteraction; + messageOrInteraction: Message | AnyInteraction; command: Command; commandContext: Record; } diff --git a/src/lib/parsers/ChatInputCommandArgs.ts b/src/lib/parsers/ChatInputCommandArgs.ts index b4dc59b03..fb7e74171 100644 --- a/src/lib/parsers/ChatInputCommandArgs.ts +++ b/src/lib/parsers/ChatInputCommandArgs.ts @@ -543,6 +543,6 @@ export class ChatInputCommandArgs extends Args { * Defines the `JSON.stringify` override. */ public toJSON(): ArgsJson { - return { message: this.interaction, command: this.command, commandContext: this.commandContext }; + return { messageOrInteraction: this.interaction, command: this.command, commandContext: this.commandContext }; } } diff --git a/src/lib/parsers/MessageArgs.ts b/src/lib/parsers/MessageArgs.ts index e963606f4..5b22910c8 100644 --- a/src/lib/parsers/MessageArgs.ts +++ b/src/lib/parsers/MessageArgs.ts @@ -710,7 +710,7 @@ export class MessageArgs extends Args { * Defines the `JSON.stringify` override. */ public toJSON(): ArgsJson { - return { message: this.message, command: this.command, commandContext: this.commandContext }; + return { messageOrInteraction: this.message, command: this.command, commandContext: this.commandContext }; } }