|
|
@ -177,6 +177,9 @@ func dynamicCommandHandler(rtm *slack.RTM, ev *slack.MessageEvent, redisClient * |
|
|
|
case "rip": |
|
|
|
case "rip": |
|
|
|
s := strings.SplitN(string(ev.Text), " ", 2) |
|
|
|
s := strings.SplitN(string(ev.Text), " ", 2) |
|
|
|
riphandler(rtm, ev, s[1]) |
|
|
|
riphandler(rtm, ev, s[1]) |
|
|
|
|
|
|
|
case "summon": |
|
|
|
|
|
|
|
s := strings.SplitN(string(ev.Text), " ", 2) |
|
|
|
|
|
|
|
summonhandler(rtm, ev, s[1]) |
|
|
|
case "gnu": |
|
|
|
case "gnu": |
|
|
|
s := strings.SplitN(string(ev.Text), " ", 2) |
|
|
|
s := strings.SplitN(string(ev.Text), " ", 2) |
|
|
|
gnuhandler(rtm, ev, s[1]) |
|
|
|
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)) |
|
|
|
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) { |
|
|
|
func riphandler(rtm *slack.RTM, ev *slack.MessageEvent, target string) { |
|
|
|
// create a timestamp to use
|
|
|
|
// create a timestamp to use
|
|
|
|
t := time.Now() |
|
|
|
t := time.Now() |
|
|
|