The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Rocket.Chat/packages/rocketchat-lib/client/lib/startup/commands.js

12 lines
414 B

Meteor.startup(function _loadDynamicallyDefinedCommands() {
// The reason there is a 500 millisecond delay is so that we are
// a little "easier" on the server during start up
setTimeout(() => {
RocketChat.API.v1.get('commands.list').then(function _loadedCommands(result) {
result.commands.forEach((command) => {
RocketChat.slashCommands.commands[command.command] = command;
});
});
}, 500);
});