Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewpbrett committed Aug 22, 2018
1 parent a1c778f commit 0535afb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/beebot.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ var startBot = function(teamId, rurl=null) {
handleMessage(rtm, message)
}
if (message.text.match(new RegExp(/\+\+|--/))) {
console.log('spotted a ++')
karmabot.handleMessage(rtm, message)
}
})
Expand Down
3 changes: 2 additions & 1 deletion lib/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function changeKarmaAndPost(rtm, team, channel, entity, delta) {
}

var handleMessage = function(rtm, message) {
console.log("karmabot handling message")
redis.get(rkey(message.team, "on"), function(err, obj) {
if (obj && !err) {
var regex = /(\S+)(\+\+|--)\b/g
Expand Down Expand Up @@ -80,7 +81,7 @@ var handleSlash = function(req, resp) {

if (text === "on") {
redis.set(rkey(team_id, "on"), 1, function(err, obj) {
console.log(`DEBUG: in handleSlash() about to call ` +
console.log(`DEBUG: in handleSlash() about to call ` +
`beebot.startBot("${team_id}", ${rurl})`)
console.log(`DEBUG err/obj = ${JSON.stringify(err)}/${JSON.stringify(obj)}`)
beebot.startBot(team_id, rurl)
Expand Down

0 comments on commit 0535afb

Please sign in to comment.