From ad0738745a9a2fafae0353518a50c3640b86d366 Mon Sep 17 00:00:00 2001 From: yhx-12243 Date: Tue, 4 Jun 2024 09:59:50 -0400 Subject: [PATCH] fix(core): default value fallback location some command that goes interaction/command (e.g., Discord) won't pass the function contains that logic. --- packages/core/src/command/parser.ts | 7 ------- packages/core/src/session.ts | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/core/src/command/parser.ts b/packages/core/src/command/parser.ts index dc967529d..b8cde5e91 100644 --- a/packages/core/src/command/parser.ts +++ b/packages/core/src/command/parser.ts @@ -463,13 +463,6 @@ export namespace Argv { } } - // assign default values - for (const { name, fallback } of Object.values(this._options)) { - if (fallback !== undefined && !(name in options)) { - options[name] = fallback - } - } - delete argv.tokens return { ...argv, options, args, error: argv.error || '', command: this as any } } diff --git a/packages/core/src/session.ts b/packages/core/src/session.ts index 7a8a9fb82..c50d2d1cd 100644 --- a/packages/core/src/session.ts +++ b/packages/core/src/session.ts @@ -377,6 +377,13 @@ export class Session