diff --git a/commands.go b/commands.go index a4b6e3e..ebbe70e 100644 --- a/commands.go +++ b/commands.go @@ -207,6 +207,18 @@ func rollDice(s *discordgo.Session, m *discordgo.Message, ctx *mux.Context) { s.ChannelMessageSend(m.ChannelID, resp) } +//Ask the Magic Conch shell to predict the future! +func askConch(s *discordgo.Session, m *discordgo.Message, ctx *mux.Context) { + var resp string + if len(ctx.Fields) > 1 { + conchResponses := []string{"It is certain", "It is decidedly so", "Without a doubt", "Yes definitely", "You may rely on it", "As I see it, yes", "Most likely", "Outlook good", "Yes", "Signs point to yes", "Reply hazy try again", "Ask again later", "Better not tell you now", "Cannot predict now", "Concentrate and ask again", "Don't count on it", "My reply is no", "My sources say no", "Outlook not so good", "Very doubtful"} + resp = conchResponses[rand.Intn(len(conchResponses))] + } else { + resp = "The Magic Conchâ„¢ may be able to see into the future, but it can't read your mind! Please include a question." + } + s.ChannelMessageSend(m.ChannelID, resp) +} + //Test command that says UwU func sayUwU(s *discordgo.Session, m *discordgo.Message, ctx *mux.Context) { s.ChannelMessageSend(m.ChannelID, "UwU *nuzzles*") diff --git a/pocketbot.go b/pocketbot.go index a8313af..3c6e632 100644 --- a/pocketbot.go +++ b/pocketbot.go @@ -70,6 +70,7 @@ func main() { Router.Route("sleep", "Something about sleeping...", goToSleep) Router.Route("setplaying", "Set the nowplaying message for the bot.", setNowPlaying) Router.Route("roll", "Roll some dice!", rollDice) + Router.Route("conch", "Ask the Magic Conchâ„¢ shell to predict the future!", askConch) Router.Route("uwu", "Say UwU", sayUwU) //Open a connection to Discord