modules/starboard: Fix duplicate starring in message

Starboard is not meant to star a message multiple times. After investigation, it has been noted that the check if a message has been starred does not check the same ID as the one recorded. To rectify this, the recorded ID is now the message that got starred instead of the one sent to starboard.
master
Luther Wen Xu 2019-12-12 12:37:38 +07:00
parent 1bdf798cb9
commit 70655246ac
Signed by: chanbakjsd
GPG Key ID: B7D77E3E9D102B70
1 changed files with 1 additions and 1 deletions

@ -102,7 +102,7 @@ func ReactListener(s *discordgo.Session, m *discordgo.MessageReactionAdd) {
log.Error(s, "listenToStarboardReact", "messageReactionAdd", err)
return
}
err = db.SetStarred(msg.ID)
err = db.SetStarred(m.MessageID)
if err != nil {
log.Error(s, err)
return