diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 6d9ed9467d..3b6a202cf6 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -155,6 +155,18 @@ function success(promise?: Promise) { */ export const Commands = [ + new Command({ + command: 'spoiler', + args: '', + description: _td('Sends the given message as a spoiler'), + runFn: function(roomId, message) { + return success(ContentHelpers.makeHtmlMessage( + message, + `${message}`, + )); + }, + category: CommandCategories.messages, + }), new Command({ command: 'shrug', args: '', diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 3788427c53..cc2637f41d 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -417,6 +417,7 @@ "Other": "Other", "Command error": "Command error", "Usage": "Usage", + "Sends the given message as a spoiler": "Sends the given message as a spoiler", "Prepends ¯\\_(ツ)_/¯ to a plain-text message": "Prepends ¯\\_(ツ)_/¯ to a plain-text message", "Prepends (╯°□°)╯︵ ┻━┻ to a plain-text message": "Prepends (╯°□°)╯︵ ┻━┻ to a plain-text message", "Prepends ┬──┬ ノ( ゜-゜ノ) to a plain-text message": "Prepends ┬──┬ ノ( ゜-゜ノ) to a plain-text message",