Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/bot.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
'use strict';

var SlackClient = require('slack-client'),
introject = require('introject'),
relative = require('require-relative'),
sequoria = require('sequoria'),
uuid = require('uuid'),
util = require('util');
var SlackClient = require('slack-client');
var introject = require('introject');
var relative = require('require-relative');
var sequoria = require('sequoria');
var uuid = require('uuid');
var util = require('util');

var constants = require('./constants'),
Response = require('./response').Response;
Expand Down
16 changes: 8 additions & 8 deletions lib/constants.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@


var exports = module.exports = {};


/*
These are all the events that can be fired by the slack-client EventEmitter.
The values of each pair are the semantic names of the corresponding argument
in the event callback. These names will be used to inject the argument into the
context.
*/
var eventArgs = exports.eventArgs = {

var eventArgs = {
'error': ['error'],
'loggedIn': ['self', 'team'],
'error': ['error'],
Expand All @@ -27,8 +23,12 @@ var eventArgs = exports.eventArgs = {
'throw': ['error']
};


var errMsgs = exports.errMsgs = {
var errMsgs = {
'err_plugin_type': 'Plugin type {{type}} does not exist!',
'err_token': 'No token found!'
};

exports = {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be module.exports

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose using Babel! Actually I wonder how easy it is to integrate with
nodejs
On Oct 30, 2015 15:33, "Elvin Yung" notifications@github.com wrote:

In lib/constants.js
#1 (comment):

'err_plugin_type': 'Plugin type {{type}} does not exist!',
'err_token': 'No token found!'
};
+
+exports = {

This should be module.exports


Reply to this email directly or view it on GitHub
https://github.com/elvinyung/botstrap/pull/1/files#r43543385.

eventArgs: eventArgs,
errMsgs: errMsgs
};