|
|
@ -207,8 +207,8 @@ func staticCommandHandler(rtm *slack.RTM, ev *slack.MessageEvent, redisClient *r |
|
|
|
advancedhelpmsg(rtm, ev) |
|
|
|
advancedhelpmsg(rtm, ev) |
|
|
|
case "rng": |
|
|
|
case "rng": |
|
|
|
rnghandler(rtm, ev, redisClient) |
|
|
|
rnghandler(rtm, ev, redisClient) |
|
|
|
case "betarng": |
|
|
|
case "depricatedrng": |
|
|
|
betarnghandler(rtm, ev, redisClient) |
|
|
|
depricatedrnghandler(rtm, ev, redisClient) |
|
|
|
case "listen": |
|
|
|
case "listen": |
|
|
|
rtm.SendMessage(rtm.NewOutgoingMessage("*it's what you hearin*", ev.Channel)) |
|
|
|
rtm.SendMessage(rtm.NewOutgoingMessage("*it's what you hearin*", ev.Channel)) |
|
|
|
case "lorelist": |
|
|
|
case "lorelist": |
|
|
@ -290,7 +290,7 @@ func riphandler(rtm *slack.RTM, ev *slack.MessageEvent, target string) { |
|
|
|
rtm.SendMessage(rtm.NewOutgoingMessage(ripFmt, ev.Channel)) |
|
|
|
rtm.SendMessage(rtm.NewOutgoingMessage(ripFmt, ev.Channel)) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func rnghandler(rtm *slack.RTM, ev *slack.MessageEvent, redisClient *redis.Client) { |
|
|
|
func depricatedrnghandler(rtm *slack.RTM, ev *slack.MessageEvent, redisClient *redis.Client) { |
|
|
|
// get random lore from list
|
|
|
|
// get random lore from list
|
|
|
|
rngLore, err := redisClient.SRandMember("index:lore:added").Result() |
|
|
|
rngLore, err := redisClient.SRandMember("index:lore:added").Result() |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
@ -308,7 +308,7 @@ func rnghandler(rtm *slack.RTM, ev *slack.MessageEvent, redisClient *redis.Clien |
|
|
|
rtm.SendMessage(rtm.NewOutgoingMessage(rngMsg, ev.Channel)) |
|
|
|
rtm.SendMessage(rtm.NewOutgoingMessage(rngMsg, ev.Channel)) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func betarnghandler(rtm *slack.RTM, ev *slack.MessageEvent, redisClient *redis.Client) { |
|
|
|
func rnghandler(rtm *slack.RTM, ev *slack.MessageEvent, redisClient *redis.Client) { |
|
|
|
// aka index:command:added
|
|
|
|
// aka index:command:added
|
|
|
|
newType := fmt.Sprintf("index:lore:added") |
|
|
|
newType := fmt.Sprintf("index:lore:added") |
|
|
|
//command, err := botfunc.Query(newType, redisClient)
|
|
|
|
//command, err := botfunc.Query(newType, redisClient)
|
|
|
|