You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
add missing commands to the Autocomplete CommandProvider
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -21,6 +21,7 @@ import AutocompleteProvider from './AutocompleteProvider';
|
||||
import Fuse from 'fuse.js';
|
||||
import {TextualCompletion} from './Components';
|
||||
|
||||
// TODO merge this with the factory mechanics of SlashCommands?
|
||||
// Warning: Since the description string will be translated in _t(result.description), all these strings below must be in i18n/strings/en_EN.json file
|
||||
const COMMANDS = [
|
||||
{
|
||||
@@ -33,6 +34,16 @@ const COMMANDS = [
|
||||
args: '<user-id> [reason]',
|
||||
description: 'Bans user with given id',
|
||||
},
|
||||
{
|
||||
command: '/unban',
|
||||
args: '<user-id> [reason]',
|
||||
description: 'Unbans user with given id',
|
||||
},
|
||||
{
|
||||
command: '/op',
|
||||
args: '<user-id>',
|
||||
description: 'Ops user with given id',
|
||||
},
|
||||
{
|
||||
command: '/deop',
|
||||
args: '<user-id>',
|
||||
@@ -48,6 +59,16 @@ const COMMANDS = [
|
||||
args: '<room-alias>',
|
||||
description: 'Joins room with given alias',
|
||||
},
|
||||
{
|
||||
command: '/part',
|
||||
args: '<room-alias>',
|
||||
description: 'Leaves room with given alias',
|
||||
},
|
||||
{
|
||||
command: '/topic',
|
||||
args: '<topic>',
|
||||
description: 'Sets the room topic',
|
||||
},
|
||||
{
|
||||
command: '/kick',
|
||||
args: '<user-id> [reason]',
|
||||
@@ -63,6 +84,17 @@ const COMMANDS = [
|
||||
args: '<query>',
|
||||
description: 'Searches DuckDuckGo for results',
|
||||
},
|
||||
{
|
||||
command: '/tint',
|
||||
args: '<color1> [<color2>]',
|
||||
description: 'Change colourscheme of current room',
|
||||
},
|
||||
{
|
||||
command: '/verify',
|
||||
args: '<userId> <deviceId> <deviceSigningKey>',
|
||||
description: 'Verify a user, device, and pubkey tuple',
|
||||
},
|
||||
// Omitting `/markdown` as it only seems to apply to OldComposer
|
||||
];
|
||||
|
||||
const COMMAND_RE = /(^\/\w*)/g;
|
||||
|
||||
Reference in New Issue
Block a user