From 8183849fe4e70eebf5dc10dd22bc37185eb92c84 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 4 Nov 2023 21:35:50 +0200 Subject: [PATCH] Add more aliases for /help pages --- public/scripts/slash-commands.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/public/scripts/slash-commands.js b/public/scripts/slash-commands.js index d74d882de..479338a63 100644 --- a/public/scripts/slash-commands.js +++ b/public/scripts/slash-commands.js @@ -639,21 +639,34 @@ async function sendCommentMessage(_, text) { await saveChatConditional(); } +/** + * Displays a help message from the slash command + * @param {any} _ Unused + * @param {string} type Type of help to display + */ function helpCommandCallback(_, type) { - switch (type?.trim()) { + switch (type?.trim()?.toLowerCase()) { case 'slash': + case 'commands': + case 'slashes': + case 'slash commands': case '1': sendSystemMessage(system_message_types.SLASH_COMMANDS); break; case 'format': + case 'formatting': + case 'formats': + case 'chat formatting': case '2': sendSystemMessage(system_message_types.FORMATTING); break; case 'hotkeys': + case 'hotkey': case '3': sendSystemMessage(system_message_types.HOTKEYS); break; case 'macros': + case 'macro': case '4': sendSystemMessage(system_message_types.MACROS); break;