diff --git a/src/utils/command.ts b/src/utils/command.ts index 3cfa939..713857e 100644 --- a/src/utils/command.ts +++ b/src/utils/command.ts @@ -6,7 +6,7 @@ export interface Args { match: CommandArgumentMatchTypes // Still needs to be implemented // type?: unknown - defaultValue?: string + defaultValue?: unknown flag?: string } @@ -15,8 +15,10 @@ export function parseArgs( messageArgs: string[] ): Record | null { if (commandArgs === undefined) return null + const messageArgsNullableCopy: Array = [...messageArgs] const args: Record = {} + for (const entry of commandArgs) { switch (entry.match) { case 'flag':