Don't look for user in bump response
This commit is contained in:
@ -27,10 +27,8 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|||||||
}
|
}
|
||||||
if strings.Contains(m.Embeds[0].Description, "Bump done!") {
|
if strings.Contains(m.Embeds[0].Description, "Bump done!") {
|
||||||
log.LogDebug("Finding string %+v", m.Embeds[0].Description)
|
log.LogDebug("Finding string %+v", m.Embeds[0].Description)
|
||||||
re := regexp.MustCompile("<@(.*)>")
|
go bumpTimer()
|
||||||
match := re.FindStringSubmatch(m.Embeds[0].Description)
|
return
|
||||||
activeInteraction(s, match[1])
|
|
||||||
config.LastBumper = match[1]
|
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -59,14 +57,6 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|||||||
activeInteraction(s, m.Author.ID)
|
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) {
|
if strings.Contains(m.Content, s.State.User.ID) {
|
||||||
b := BotCommand{
|
b := BotCommand{
|
||||||
Session: s,
|
Session: s,
|
||||||
|
|||||||
Reference in New Issue
Block a user