|
|
@ -241,6 +241,10 @@ func staticCommandHandler(rtm *slack.RTM, ev *slack.MessageEvent, redisClient *r |
|
|
|
ceelorollhandler(rtm, ev) |
|
|
|
ceelorollhandler(rtm, ev) |
|
|
|
case "fortune": |
|
|
|
case "fortune": |
|
|
|
fortunehandler(rtm, ev) |
|
|
|
fortunehandler(rtm, ev) |
|
|
|
|
|
|
|
case "kenm": |
|
|
|
|
|
|
|
kenmhandler(rtm, ev) |
|
|
|
|
|
|
|
case "showerthoughts": |
|
|
|
|
|
|
|
showerthoughtshandler(rtm, ev) |
|
|
|
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": |
|
|
@ -379,7 +383,7 @@ func ceelorollhandler(rtm *slack.RTM, ev *slack.MessageEvent) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func fortunehandler(rtm *slack.RTM, ev *slack.MessageEvent) { |
|
|
|
func fortunehandler(rtm *slack.RTM, ev *slack.MessageEvent) { |
|
|
|
fortune, err := exec.Command("fortune").CombinedOutput() |
|
|
|
fortune, err := exec.Command("fortune", "-e", "fortunes").CombinedOutput() |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
fmt.Printf("%v\n", err) |
|
|
|
fmt.Printf("%v\n", err) |
|
|
|
rtm.SendMessage(rtm.NewOutgoingMessage("Fortune command is broken, contact HFIC", ev.Channel)) |
|
|
|
rtm.SendMessage(rtm.NewOutgoingMessage("Fortune command is broken, contact HFIC", ev.Channel)) |
|
|
@ -389,6 +393,28 @@ func fortunehandler(rtm *slack.RTM, ev *slack.MessageEvent) { |
|
|
|
rtm.SendMessage(rtm.NewOutgoingMessage(fmt.Sprintf("%s", fortune), ev.Channel)) |
|
|
|
rtm.SendMessage(rtm.NewOutgoingMessage(fmt.Sprintf("%s", fortune), ev.Channel)) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func kenmhandler(rtm *slack.RTM, ev *slack.MessageEvent) { |
|
|
|
|
|
|
|
fortune, err := exec.Command("fortune", "-e", "kenm").CombinedOutput() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
fmt.Printf("%v\n", err) |
|
|
|
|
|
|
|
rtm.SendMessage(rtm.NewOutgoingMessage("kenm command is broken, contact HFIC", ev.Channel)) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rtm.SendMessage(rtm.NewOutgoingMessage(fmt.Sprintf("%s", fortune), ev.Channel)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func showerthoughtshandler(rtm *slack.RTM, ev *slack.MessageEvent) { |
|
|
|
|
|
|
|
fortune, err := exec.Command("fortune", "-e", "showerthoughts").CombinedOutput() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
fmt.Printf("%v\n", err) |
|
|
|
|
|
|
|
rtm.SendMessage(rtm.NewOutgoingMessage("showerthoughts command is broken, contact HFIC", ev.Channel)) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rtm.SendMessage(rtm.NewOutgoingMessage(fmt.Sprintf("%s", fortune), ev.Channel)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func rrhandler(rtm *slack.RTM, ev *slack.MessageEvent) { |
|
|
|
func rrhandler(rtm *slack.RTM, ev *slack.MessageEvent) { |
|
|
|
//fmt.Print(rand.Intn(100))
|
|
|
|
//fmt.Print(rand.Intn(100))
|
|
|
|
dice := []string{"*click*", "*BANG*", "*click*", "*click*", "*click*", "*click*"} |
|
|
|
dice := []string{"*click*", "*BANG*", "*click*", "*click*", "*click*", "*click*"} |
|
|
|