Browse Source

Update rng function

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

8
lorebot/lorebot.go

@ -207,8 +207,8 @@ func staticCommandHandler(rtm *slack.RTM, ev *slack.MessageEvent, redisClient *r
advancedhelpmsg(rtm, ev)
case "rng":
rnghandler(rtm, ev, redisClient)
case "betarng":
betarnghandler(rtm, ev, redisClient)
case "depricatedrng":
depricatedrnghandler(rtm, ev, redisClient)
case "listen":
rtm.SendMessage(rtm.NewOutgoingMessage("*it's what you hearin*", ev.Channel))
case "lorelist":
@ -290,7 +290,7 @@ func riphandler(rtm *slack.RTM, ev *slack.MessageEvent, target string) {
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
rngLore, err := redisClient.SRandMember("index:lore:added").Result()
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))
}
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
newType := fmt.Sprintf("index:lore:added")
//command, err := botfunc.Query(newType, redisClient)

Loading…
Cancel
Save