forked from GitHub/dbot
added usage command
This commit is contained in:
parent
1ad20e9606
commit
b17ad5042b
@ -53,6 +53,18 @@ var command = function(dbot) {
|
|||||||
'name': 'command',
|
'name': 'command',
|
||||||
'ignorable': false,
|
'ignorable': false,
|
||||||
|
|
||||||
|
'commands': {
|
||||||
|
'~usage': function(event) {
|
||||||
|
var commandName = event.params[0];
|
||||||
|
if(dbot.commands.hasOwnProperty(commandName)) {
|
||||||
|
event.reply('Usage for ' + commandName + ': ' +
|
||||||
|
dbot.commands[commandName].usage);
|
||||||
|
} else {
|
||||||
|
event.reply('No usage information for ' + commandName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the appropriate command given the input.
|
* Run the appropriate command given the input.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user