mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 11:15:53 +03:00
Merge pull request #5696 from robintown/spoiler-command
Add /spoiler command
This commit is contained in:
commit
661202839c
2 changed files with 13 additions and 0 deletions
|
@ -155,6 +155,18 @@ function success(promise?: Promise<any>) {
|
|||
*/
|
||||
|
||||
export const Commands = [
|
||||
new Command({
|
||||
command: 'spoiler',
|
||||
args: '<message>',
|
||||
description: _td('Sends the given message as a spoiler'),
|
||||
runFn: function(roomId, message) {
|
||||
return success(ContentHelpers.makeHtmlMessage(
|
||||
message,
|
||||
`<span data-mx-spoiler>${message}</span>`,
|
||||
));
|
||||
},
|
||||
category: CommandCategories.messages,
|
||||
}),
|
||||
new Command({
|
||||
command: 'shrug',
|
||||
args: '<message>',
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue