Browse Source

Add summon function

develop
Matthew Faltys 7 years ago
parent
commit
c083139598
  1. 8
      lorebot/lorebot.go

8
lorebot/lorebot.go

@ -177,6 +177,9 @@ func dynamicCommandHandler(rtm *slack.RTM, ev *slack.MessageEvent, redisClient *
case "rip":
s := strings.SplitN(string(ev.Text), " ", 2)
riphandler(rtm, ev, s[1])
case "summon":
s := strings.SplitN(string(ev.Text), " ", 2)
summonhandler(rtm, ev, s[1])
case "gnu":
s := strings.SplitN(string(ev.Text), " ", 2)
gnuhandler(rtm, ev, s[1])
@ -271,6 +274,11 @@ func rekhandler(rtm *slack.RTM, ev *slack.MessageEvent, target string, redisClie
rtm.SendMessage(rtm.NewOutgoingMessage(rekFmt, ev.Channel))
}
func summonhandler(rtm *slack.RTM, ev *slack.MessageEvent, target string) {
sumFmt := fmt.Sprintf("つ◕_◕)つ %s つ◕_◕)つ", target)
rtm.SendMessage(rtm.NewOutgoingMessage(sumFmt, ev.Channel))
}
func riphandler(rtm *slack.RTM, ev *slack.MessageEvent, target string) {
// create a timestamp to use
t := time.Now()

Loading…
Cancel
Save