mirror of https://github.com/velour/catbase.git
Merge branch 'master' of https://github.com/velour/catbase into tea-bug
Resolved new regex with change replacing 🍵 with 🍵
This commit is contained in:
commit
8087f23d53
|
@ -137,15 +137,15 @@ func (p *CounterPlugin) Message(message msg.Message) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
if tea, _ := regexp.MatchString("(?i)^tea\\. [0-9A-Za-z_ ]*\\. ((hot)|(iced))\\.?$", message.Body); tea {
|
if tea, _ := regexp.MatchString("(?i)^tea\\. [0-9A-Za-z_ ]*\\. ((hot)|(iced))\\.?$", message.Body); tea {
|
||||||
item, err := GetItem(p.DB, nick, "🍵")
|
item, err := GetItem(p.DB, nick, ":tea:")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Error finding item %s.%s: %s.", nick, "🍵", err)
|
log.Printf("Error finding item %s.%s: %s.", nick, ":tea:", err)
|
||||||
// Item ain't there, I guess
|
// Item ain't there, I guess
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
log.Printf("About to update item: %#v", item)
|
log.Printf("About to update item: %#v", item)
|
||||||
item.UpdateDelta(1)
|
item.UpdateDelta(1)
|
||||||
p.Bot.SendMessage(channel, fmt.Sprintf("bleep-bloop-blop... %s has %d 🍵",
|
p.Bot.SendMessage(channel, fmt.Sprintf("bleep-bloop-blop... %s has %d :tea:",
|
||||||
nick, item.Count))
|
nick, item.Count))
|
||||||
return true
|
return true
|
||||||
} else if message.Command && message.Body == "reset me" {
|
} else if message.Command && message.Body == "reset me" {
|
||||||
|
|
Loading…
Reference in New Issue