From a1ed26f73611eae88f3a311948d32a98314783f6 Mon Sep 17 00:00:00 2001 From: Daniel Tam Date: Tue, 9 Jun 2020 15:17:19 -0500 Subject: [PATCH] check messages from the bot and ignore --- bunnybot.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bunnybot.go b/bunnybot.go index 963c19f..5e9fc10 100644 --- a/bunnybot.go +++ b/bunnybot.go @@ -53,6 +53,10 @@ func main() { } func message_create (s *discordgo.Session, m *discordgo.MessageCreate) { + // ignore messages from the bot + if m.Author.ID == s.State.User.ID { + return + } // make sure we match our bot's message token if len(m.Content) > 2 {