hubot
hubot copied to clipboard
Is it possible to have nested modules and in which case how?
I'm trying to include nested modules but can't get it to work, is it possible in which case how?
This is what I'm trying out but can't get to work
This file is called
serie.js
and is located under thescripts
folder.
const floorball = require('./serie/floorball/index');
const hockey = require('./serie/hockey/index');
const command = {
floorball ,
hockey,
};
module.exports = command;
Both
'./serie/floorball/index'
and'./serie/floorball/index'
looks like this
module.exports = (robot) => {
robot.hear(/serie floorball help/i, (res) => {
res.reply('Test');
});
};
module.exports = (robot) => {
robot.hear(/serie hockey help/i, (res) => {
res.reply('Test');
});
};
But this does not work, any ideas?