diff --git a/bots/discord/OnMessageCreate.go b/bots/discord/OnMessageCreate.go index 78fab633..a50af842 100644 --- a/bots/discord/OnMessageCreate.go +++ b/bots/discord/OnMessageCreate.go @@ -66,7 +66,10 @@ func OnMessageCreate(s *discordgo.Session, msg *discordgo.MessageCreate) { // Random quote if msg.Content == "!randomquote" { - allQuotes := arn.AllQuotes() + allQuotes := arn.FilterQuotes(func(quote *arn.Quote) bool { + return !quote.IsDraft && quote.IsValid() + }) + quote := allQuotes[rand.Intn(len(allQuotes))] s.ChannelMessageSend(msg.ChannelID, "https://notify.moe"+quote.Link()) return