mirror of https://github.com/velour/catbase.git
beers: add dynamic drinking word feature
This commit is contained in:
parent
41a757cd8b
commit
2b47654302
|
@ -154,7 +154,8 @@ func (p *BeersPlugin) register() {
|
|||
return true
|
||||
}},
|
||||
{Kind: bot.Message, IsCmd: true,
|
||||
Regex: regexp.MustCompile(`(?i)^imbibe$`),
|
||||
Regex: regexp.MustCompile(`(?i)^` +
|
||||
strings.Join(p.c.GetArray("beers.imbibewords", []string{"imbibe", "quaff"}), "|") + `$`),
|
||||
Handler: func(r bot.Request) bool {
|
||||
p.addBeers(r.Msg.User.Name, 1)
|
||||
p.randomReply(r.Conn, r.Msg.Channel)
|
||||
|
|
Loading…
Reference in New Issue