From 27d5cf3a627ae20bb2b8e6f343c6123eb21595fb Mon Sep 17 00:00:00 2001 From: Rudi Date: Fri, 13 May 2022 07:30:39 -0400 Subject: [PATCH] Don't look for user in bump response --- discordMessage.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/discordMessage.go b/discordMessage.go index ecb75a1..0819771 100644 --- a/discordMessage.go +++ b/discordMessage.go @@ -27,10 +27,8 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) { } if strings.Contains(m.Embeds[0].Description, "Bump done!") { log.LogDebug("Finding string %+v", m.Embeds[0].Description) - re := regexp.MustCompile("<@(.*)>") - match := re.FindStringSubmatch(m.Embeds[0].Description) - activeInteraction(s, match[1]) - config.LastBumper = match[1] + go bumpTimer() + return } return @@ -59,14 +57,6 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) { activeInteraction(s, m.Author.ID) } } - if strings.HasPrefix(m.Content, "!d bump") { - if time.Since(config.BumpTime) < 2*time.Hour { - s.ChannelMessageSend(m.ChannelID, fmt.Sprintf("Sorry, <@%+v> already claimed the bump. Better luck next time!", config.LastBumper)) - return - } - go bumpTimer(s) - return - } if strings.Contains(m.Content, s.State.User.ID) { b := BotCommand{ Session: s,