Add /spoiler command
As a temporary measure until we have an extensible Markdown parser. Signed-off-by: Robin Townsend <robin@robin.town>pull/21833/head
parent
cf0f591cba
commit
f1fabd831c
|
@ -154,6 +154,18 @@ function success(promise?: Promise<any>) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const Commands = [
|
export const Commands = [
|
||||||
|
new Command({
|
||||||
|
command: 'spoiler',
|
||||||
|
args: '<message>',
|
||||||
|
description: _td('Sends the given message as a spoiler'),
|
||||||
|
runFn: function(roomId, message) {
|
||||||
|
return success(MatrixClientPeg.get().sendHtmlMessage(
|
||||||
|
roomId, message,
|
||||||
|
`<span data-mx-spoiler>${message}</span>`,
|
||||||
|
));
|
||||||
|
},
|
||||||
|
category: CommandCategories.messages,
|
||||||
|
}),
|
||||||
new Command({
|
new Command({
|
||||||
command: 'shrug',
|
command: 'shrug',
|
||||||
args: '<message>',
|
args: '<message>',
|
||||||
|
|
|
@ -415,6 +415,7 @@
|
||||||
"Other": "Other",
|
"Other": "Other",
|
||||||
"Command error": "Command error",
|
"Command error": "Command error",
|
||||||
"Usage": "Usage",
|
"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",
|
"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 New Issue