aboutsummaryrefslogtreecommitdiff
path: root/extramemes.go
diff options
context:
space:
mode:
authorNathan Perry <avaglir@gmail.com>2017-07-28 00:51:34 -0400
committerNathan Perry <avaglir@gmail.com>2017-07-28 00:51:34 -0400
commit47877a3045c745e70b2e77a91e1f59e6f432c5df (patch)
treedfcb8b1ea145c33c04aee45dd0c46824bf5fec36 /extramemes.go
parent54359c61daadf1d61730d224675c3b4595a5b83a (diff)
try own wav impl
Diffstat (limited to 'extramemes.go')
-rw-r--r--extramemes.go14
1 files changed, 14 insertions, 0 deletions
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
+}