fendersperth / fendersbot

A group project for learning and teaching via a real code base
9 stars 3 forks source link

Shift Bots event logic out of slackclient #12

Closed luke-john closed 8 years ago

luke-john commented 8 years ago

ie

events.js

import client from 'lib/client';
import message from 'message';

client.on('message', message);

message.js

import client from 'lib/client';

export default (message) => {
  const channel = client.getChannelGroupOrDMByID(message.channel);
  // do stuff
}
kevincharm commented 8 years ago

Yeah it would be good to modularise this. Perhaps still call the slack-client instance slack or maybe slackClient to be less ambiguous?

luke-john commented 8 years ago

Yep, client would not be a useful name.

Is there going to be any other interface with slack? If not just slack seems fine.

karlbright commented 8 years ago

This will be fixed by #23

karlbright commented 8 years ago

Fixed by Slack Application changes.