Remove dupe reaction, log duplicates instead
The 🔁 emoji was being added for duplicate rides. Now we just log the duplicate server-side without adding any reaction to the message. Signed-off-by: Blake Ridgway <blake@blakeridgway.com>
This commit is contained in:
@@ -17,7 +17,6 @@ import (
|
||||
|
||||
const (
|
||||
reactionOK = "✅"
|
||||
reactionDupe = "🔁"
|
||||
settingChannel = "fitness_channel_id"
|
||||
)
|
||||
|
||||
@@ -272,7 +271,7 @@ func (b *Bot) onMessageCreate(s *discordgo.Session, m *discordgo.MessageCreate)
|
||||
_ = s.MessageReactionAdd(m.ChannelID, m.ID, reactionOK)
|
||||
b.scheduleTopicUpdate(m.GuildID, m.ChannelID)
|
||||
} else {
|
||||
_ = s.MessageReactionAdd(m.ChannelID, m.ID, reactionDupe)
|
||||
log.Printf("duplicate ride detected for %s, skipping reaction", m.Author.Username)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user