From 09b56bb99848430ccd60e802b13da255e39a025e Mon Sep 17 00:00:00 2001 From: The-Foxon Date: Wed, 28 Jun 2023 04:36:40 +1200 Subject: [PATCH] small fix exec command --- src/commands/Exec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/commands/Exec.ts b/src/commands/Exec.ts index abee3cf..986fb0c 100644 --- a/src/commands/Exec.ts +++ b/src/commands/Exec.ts @@ -31,7 +31,10 @@ export default { } else await interaction.followUp("Команда выполнена.\n" + JSON.stringify(status)) } else { - await interaction.followUp("Ошибка выполнения команды.\n" + JSON.stringify(status)) + if (!!status && status.CommandMessages.filter(e => e.Type === "Notifications-Chat").length > 0) + await interaction.followUp(status.CommandMessages.filter(e => e.Type === "Notifications-Chat")[0].Message) + else + await interaction.followUp("Ошибка выполнения команды.\n" + JSON.stringify(status)) } return } catch (error) {