From adde513cb8c32c42245a14ee1485c613089bef42 Mon Sep 17 00:00:00 2001 From: carlosrodrigues94 Date: Wed, 27 Jul 2022 10:02:45 -0300 Subject: [PATCH 1/2] fix: slash commands description as undefined --- apps/meteor/app/utils/lib/slashCommand.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/meteor/app/utils/lib/slashCommand.ts b/apps/meteor/app/utils/lib/slashCommand.ts index 4d78c2c618a21..77ce4d2ee4eaf 100644 --- a/apps/meteor/app/utils/lib/slashCommand.ts +++ b/apps/meteor/app/utils/lib/slashCommand.ts @@ -17,6 +17,7 @@ export interface ISlashCommandAddParams { previewer?: SlashCommand['previewer']; previewCallback?: SlashCommand['previewCallback']; appId?: string; + description?: string; } export const slashCommands = { @@ -30,14 +31,16 @@ export const slashCommands = { previewer, previewCallback, appId, + description = '', }: ISlashCommandAddParams): void { this.commands[command] = { command, callback, params: options.params, - description: options.description, + description: options.description || description, permission: options.permission, clientOnly: options.clientOnly || false, + result, providesPreview: Boolean(providesPreview), previewer, From ef3ecf8dbba19638eb12ba29ec0441c6e5132718 Mon Sep 17 00:00:00 2001 From: Carlos Rodrigues Date: Thu, 11 Aug 2022 11:11:30 -0300 Subject: [PATCH 2/2] chore: remove blank line --- apps/meteor/app/utils/lib/slashCommand.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/meteor/app/utils/lib/slashCommand.ts b/apps/meteor/app/utils/lib/slashCommand.ts index 77ce4d2ee4eaf..7ef213f14912b 100644 --- a/apps/meteor/app/utils/lib/slashCommand.ts +++ b/apps/meteor/app/utils/lib/slashCommand.ts @@ -40,7 +40,6 @@ export const slashCommands = { description: options.description || description, permission: options.permission, clientOnly: options.clientOnly || false, - result, providesPreview: Boolean(providesPreview), previewer,