-
Notifications
You must be signed in to change notification settings - Fork 0
/
bot.js
31 lines (25 loc) · 820 Bytes
/
bot.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env node
'use strict';
/**
* TurtlesBotBot launcher script.
*
* @author SuperBeaver
*/
var TurtlesBot = require('./lib/turtlesbot');
/**
* Environment variables used to configure the bot:
*
* BOT_API_KEY : the authentication token to allow the bot to connect to your slack organization. You can get your
* token at the following url: https://<yourorganization>.slack.com/services/new/bot (Mandatory)
* BOT_DB_PATH: the path of the SQLite database used by the bot
* BOT_NAME: the username you want to give to the bot within your organisation.
*/
var token = process.env.BOT_API_KEY || require('./token');
var dbPath = process.env.BOT_DB_PATH;
var name = process.env.BOT_NAME;
var turtlesbot = new TurtlesBot({
token: token,
dbPath: dbPath,
name: name
});
turtlesbot.run();