From 565174444577d51cc6bf86d0478a01aad7be0248 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Tue, 6 Feb 2024 21:51:49 +0500 Subject: [PATCH] update --- theme/dbd-soft-ui/utils/cmdHandler.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/theme/dbd-soft-ui/utils/cmdHandler.js b/theme/dbd-soft-ui/utils/cmdHandler.js index b7655e4..9cc5a71 100644 --- a/theme/dbd-soft-ui/utils/cmdHandler.js +++ b/theme/dbd-soft-ui/utils/cmdHandler.js @@ -14,16 +14,17 @@ module.exports = (commands, prefix) => { const commandsArr = []; - commands.filter(cmd => cmd.category === category).map(cmd => { - const obj = { - commandName: cmd.name, - commandUsage: `${cmd.usage ? cmd.usage : `${prefix}${cmd.name}`}`, - commandDescription: cmd.description, - commandAlias: cmd.aliases?.join(", ") || "None", - }; - commandsArr.push(obj); - }); - + commands + .filter(cmd => cmd.category === category) + .map(cmd => { + const obj = { + commandName: cmd.name, + commandUsage: `${cmd.usage ? cmd.usage : `${prefix}${cmd.name}`}`, + commandDescription: cmd.description, + commandAlias: cmd.aliases?.join(", ") || "None", + }; + commandsArr.push(obj); + }); const categoryObj = { categoryId: category, @@ -40,4 +41,4 @@ module.exports = (commands, prefix) => { } return finalCategories; -}; \ No newline at end of file +};