Add magic conch shell command

pull/20/head
pocketjawa 2020-05-20 21:40:22 -04:00
parent 2905b1698b
commit 2e91d16a02
2 changed files with 13 additions and 0 deletions

View File

@ -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*")

View File

@ -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