Skip to content

Commit 337890d

Browse files
committed
Remove zplug-man and add bin directory
1 parent 8de27c2 commit 337890d

File tree

8 files changed

+31
-485
lines changed

8 files changed

+31
-485
lines changed

bin/botkit.js

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
var Botkit = require('botkit');
2+
var fs = require('fs');
3+
var path = require('path');
4+
5+
controller = Botkit.slackbot({
6+
debug: false
7+
});
8+
9+
controller.spawn({
10+
token: process.env.SLACK_TOKEN
11+
}).startRTM();
12+
13+
var load = function(path, file) {
14+
var ext = path.extname(file);
15+
var full = path.join(path, path.basename(file, ext));
16+
17+
try {
18+
var script = require(full);
19+
if (typeof script === 'function') {
20+
script(this);
21+
}
22+
} catch(error) {
23+
process.exit(1);
24+
}
25+
};
26+
27+
var path = path.resolve('.', 'scripts');
28+
29+
fs.readdirSync(path).sort().forEach(function(file) {
30+
load(path, file);
31+
});

zplug-man/.gitignore

-1
This file was deleted.

zplug-man/bin/botkit.js

-31
This file was deleted.

zplug-man/init.sh

-33
This file was deleted.

zplug-man/package.json

-30
This file was deleted.

0 commit comments

Comments
 (0)