multi bots online
This commit is contained in:
16
nodejs/controller/commands/default.js
Normal file
16
nodejs/controller/commands/default.js
Normal file
@ -0,0 +1,16 @@
|
||||
module.exports = {
|
||||
'help': {
|
||||
desc: `Print the allowed commands.`,
|
||||
async function(from){
|
||||
console.log('called help', from)
|
||||
let intro = [
|
||||
'I am a bot owned and operated by',
|
||||
'wmantly <wmantly@gmail.com>',
|
||||
'You have access to the following commands:'
|
||||
]
|
||||
await this.whisper(from, ...intro, ...this.__reduceCommands(from).map(command =>
|
||||
`${command} -- ${this.commands[command].desc || ''}`
|
||||
));
|
||||
}
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user