From 6bdc997cbe0464d2ba31b6de1bfd13f4441a7eb3 Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Thu, 6 May 2021 08:25:06 -0400 Subject: [PATCH] Dont show bump request on commands --- discordMessage.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/discordMessage.go b/discordMessage.go index c9d9f8a..a91b116 100644 --- a/discordMessage.go +++ b/discordMessage.go @@ -19,6 +19,9 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) { } } else { log.LogDebug("strings.Contains(m.Content, s.State.User.ID) was false for %+v", m.Content) + if bump { + s.ChannelMessageSend(m.ChannelID, fmt.Sprintf("%+v please say \"!d bump\" without the quotes to bump our server :)", m.Author.Mention())) + } } if m.Author.ID == s.State.User.ID || m.Author.Bot { return @@ -49,9 +52,7 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) { go bumpTimer(s) return } - if bump { - s.ChannelMessageSend(m.ChannelID, fmt.Sprintf("%+v please say \"!d bump\" without the quotes to bump our server :)", m.Author.Mention())) - } + if strings.Contains(m.Content, s.State.User.ID) { log.LogDebug("%+v contained %+v", m.Content, s.State.User.ID) for _, cmd := range commands {