From 2b47654302a969c1245219c0cd5e724965f9e1a1 Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Mon, 1 Feb 2021 15:18:36 -0500 Subject: [PATCH] beers: add dynamic drinking word feature --- plugins/beers/beers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/beers/beers.go b/plugins/beers/beers.go index a2328ed..9da3e38 100644 --- a/plugins/beers/beers.go +++ b/plugins/beers/beers.go @@ -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)