go: Enforce react by user

Luther Wen Xu 2019-10-15 23:34:51 +07:00
parent d1311d057f
commit 4a377f80fc
Signed by untrusted user: chanbakjsd
GPG Key ID: B7D77E3E9D102B70
1 changed files with 3 additions and 0 deletions

@ -28,6 +28,9 @@ func queueForReact(messageID string, acceptedEmoji []string, info interface{}, c
} }
func CheckForReact(s *discordgo.Session, r *discordgo.MessageReactionAdd) { func CheckForReact(s *discordgo.Session, r *discordgo.MessageReactionAdd) {
if r.UserID == s.State.User.ID {
return
}
entry, ok := reactCallbacks[r.MessageID] entry, ok := reactCallbacks[r.MessageID]
if !ok { if !ok {
return return