From 66994e9937421d8e7302f33b69cbf922a1c1c0de Mon Sep 17 00:00:00 2001 From: pocketjawa Date: Sat, 27 Apr 2019 13:47:29 -0400 Subject: [PATCH] Stop processing after replacing words --- buttsbot.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buttsbot.go b/buttsbot.go index 84970d0..49a265e 100644 --- a/buttsbot.go +++ b/buttsbot.go @@ -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 } }