Stop processing after replacing words
parent
2574f84c65
commit
66994e9937
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue