This commit is contained in:
Flummi 2016-09-10 15:34:01 +02:00
parent d250f32e7f
commit bef5cfcbde
2 changed files with 19 additions and 1 deletions

3
bot.js
View File

@ -24,10 +24,11 @@ var child = new (forever.Monitor)('./src/main.js', {
max: 1,
silent: false,
args: [],
spinSleepTime: 2000,
watch: true,
watchIgnoreDotFiles: true,
watchIgnorePatterns: [
'*.log', 'b/*', 't/*'
'*.log', 'b/*', 't/*', 'node_modules/*'
],
watchDirectory: __dirname,
logFile: log_bot,

17
src/trigger/gitpull.js Normal file
View File

@ -0,0 +1,17 @@
var exec = require('child_process').exec;
module.exports = (bot, lib) => {
lib.trigger.add({
name: 'gitpull',
call: /^\!pull$/,
level: 100,
active: 1,
func: (e) => {
exec('cd ../../ & git pull', (error, stdout) => {
if(error === null)
e.reply(stdout);
});
},
desc: 'gitpuller'
});
};