15 lines
457 B
JavaScript
15 lines
457 B
JavaScript
const exec = require('child_process').exec;
|
|
|
|
module.exports = (robot) => {
|
|
robot.hear(/^bog aide$|bog bog aide$|^bog help$|bog bog help$/i, function (msg) {
|
|
exec("scripts/shell/aide.sh", function(err, stdout, stderr) {
|
|
if (err) {
|
|
msg.send("Une erreur est survenu ... " + stderr)
|
|
} else {
|
|
// if (stdout) { msg.send(stdout); }
|
|
msg.send(process.env.ROCKETCHAT_USER);
|
|
}
|
|
});
|
|
});
|
|
}
|