diff --git a/src/SlashCommands.js b/src/SlashCommands.js
index da3c0f91d8..4bf63256ac 100644
--- a/src/SlashCommands.js
+++ b/src/SlashCommands.js
@@ -809,6 +809,38 @@ export const CommandMap = {
return success(MatrixClientPeg.get().sendHtmlEmote(roomId, args, textToHtmlRainbow(args)));
},
}),
+
+ help: new Command({
+ name: "help",
+ description: _td("Displays list of commands with usages and descriptions"),
+ runFn: function() {
+ const InfoDialog = sdk.getComponent('dialogs.InfoDialog');
+ Modal.createTrackedDialog('Slash Commands', 'Help', InfoDialog, {
+ title: _t("Command Help"),
+ description:
+
+
+ {_t("Command")} |
+ {_t("Arguments")} |
+ {_t("Description")} |
+
+
+
+ {
+ Object.values(CommandMap).map(cmd => {
+ return
+ {cmd.command} |
+ {cmd.args} |
+ {cmd.description} |
+
;
+ })
+ }
+
+
,
+ });
+ return success();
+ },
+ }),
};
/* eslint-enable babel/no-invalid-this */
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index c5ef2fd989..85b90bae8c 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -182,6 +182,10 @@
"Forces the current outbound group session in an encrypted room to be discarded": "Forces the current outbound group session in an encrypted room to be discarded",
"Sends the given message coloured as a rainbow": "Sends the given message coloured as a rainbow",
"Sends the given emote coloured as a rainbow": "Sends the given emote coloured as a rainbow",
+ "Displays list of commands with usages and descriptions": "Displays list of commands with usages and descriptions",
+ "Command Help": "Command Help",
+ "Command": "Command",
+ "Arguments": "Arguments",
"Unrecognised command:": "Unrecognised command:",
"Reason": "Reason",
"%(targetName)s accepted the invitation for %(displayName)s.": "%(targetName)s accepted the invitation for %(displayName)s.",