Stop processing after replacing words

pull/2/head
pocketjawa 2019-04-27 13:47:29 -04:00
parent 2574f84c65
commit 66994e9937
1 changed files with 2 additions and 0 deletions

View File

@ -79,11 +79,13 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
//Check if the bot was mentioned
if isUserMentioned(m, s.State.User) == true {
s.ChannelMessageSend(m.ChannelID, textToButt(m, s))
return
}
//Replace words in random messages
if rand.Intn(100) > 85 {
s.ChannelMessageSend(m.ChannelID, textToButt(m, s))
return
}
}