fix descriptions a bit and sort the slash commands when tab-completing
This commit is contained in:
parent
84a7fc1640
commit
42dc1be341
1 changed files with 3 additions and 3 deletions
|
@ -69,7 +69,7 @@ var commands = {
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// Changes the colorscheme of your current room
|
// Changes the colorscheme of your current room
|
||||||
tint: new Command("tint", "<primaryColor> [<secondaryColor>]", function(room_id, args) {
|
tint: new Command("tint", "<color1> [<color2>]", function(room_id, args) {
|
||||||
if (args) {
|
if (args) {
|
||||||
var matches = args.match(/^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}))( +(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})))?$/);
|
var matches = args.match(/^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}))( +(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})))?$/);
|
||||||
if (matches) {
|
if (matches) {
|
||||||
|
@ -89,7 +89,7 @@ var commands = {
|
||||||
return reject(this.getUsage());
|
return reject(this.getUsage());
|
||||||
}),
|
}),
|
||||||
|
|
||||||
encrypt: new Command("encrypt", "<on/off>", function(room_id, args) {
|
encrypt: new Command("encrypt", "<on|off>", function(room_id, args) {
|
||||||
if (args == "on") {
|
if (args == "on") {
|
||||||
var client = MatrixClientPeg.get();
|
var client = MatrixClientPeg.get();
|
||||||
var members = client.getRoom(room_id).currentState.members;
|
var members = client.getRoom(room_id).currentState.members;
|
||||||
|
@ -354,7 +354,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
getCommandList: function() {
|
getCommandList: function() {
|
||||||
return Object.keys(commands).map(function(cmdKey) {
|
return Object.keys(commands).sort().map(function(cmdKey) {
|
||||||
return commands[cmdKey];
|
return commands[cmdKey];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue