process bot commands first, debugging channel messages last
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Jeffrey Paul 2020-09-08 19:31:18 -07:00
parent cfec102364
commit a72e5bc0c4

View File

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