From 47877a3045c745e70b2e77a91e1f59e6f432c5df Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Fri, 28 Jul 2017 00:51:34 -0400 Subject: try own wav impl --- extramemes.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'extramemes.go') diff --git a/extramemes.go b/extramemes.go index 4bac256..fb2f8f6 100644 --- a/extramemes.go +++ b/extramemes.go @@ -2,6 +2,7 @@ package thulani import ( "math/rand" + "regexp" "strings" "time" ) @@ -13,6 +14,7 @@ func init() { var extraMemes = []func(*messageCtx) MemeStatus{ respondToFuckYou, respondToMeme, + respondToRaaaaaaaaaaaay, } var hateMatch = []string{ @@ -70,3 +72,15 @@ func respondToMeme(ctx *messageCtx) MemeStatus { ctx.sendMessage("i am not yet capable of memeing.", false) return Interrupt } + +var ray = regexp.MustCompile("ra+y") + +// TODO: play the sound clip +func respondToRaaaaaaaaaaaay(ctx *messageCtx) MemeStatus { + if ctx.Matched && ray.MatchString(ctx.Command) { + ctx.sendMessage(ctx.Command, true) + return Interrupt + } + + return Continue +} -- cgit v1.3.1