process bot commands first, debugging channel messages last
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Jeffrey Paul 2020-09-08 19:31:18 -07:00
parent cfec102364
commit a72e5bc0c4
1 changed files with 6 additions and 5 deletions

View File

@ -208,16 +208,17 @@ func (b *Bot) HandleWebSocketResponse(event *model.WebSocketEvent) {
return
}
if event.Broadcast.ChannelId == b.debuggingChannel.Id {
b.HandleMsgFromDebuggingChannel(event)
return
}
// check to see if we have been addressed
if matched, _ := regexp.MatchString(`^\s*`+b.BotName+`\s*`, post.Message); matched {
println("i have been addressed in channel " + post.ChannelId)
//b.SendMsgToDebuggingChannel("i have been addressed in channel "+post.ChannelId, "")
b.HandleMsgFromChannel(event)
return
}
if event.Broadcast.ChannelId == b.debuggingChannel.Id {
b.HandleMsgFromDebuggingChannel(event)
return
}
}