Skip to content

Commit

Permalink
Log open DM's for debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlieHess committed Aug 28, 2015
1 parent fcdbf5c commit 8b81c43
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ class Bot {
this.groups = _.keys(this.slack.groups)
.map(k => this.slack.groups[k])
.filter(g => g.is_open && !g.is_archived);

this.dms = _.keys(this.slack.dms)
.map(k => this.slack.dms[k])
.filter(dm => dm.is_open);

console.log(`Welcome to Slack. You are ${this.slack.self.name} of ${this.slack.team.name}`);

Expand All @@ -147,6 +151,10 @@ class Bot {
if (this.groups.length > 0) {
console.log(`As well as: ${this.groups.map(g => g.name).join(', ')}`);
}

if (this.dms.length > 0) {
console.log(`Your open DM's: ${this.dms.map(dm => dm.name).join(', ')}`);
}
}
}

Expand Down

0 comments on commit 8b81c43

Please sign in to comment.