From 4a377f80fcf4ba8f896f82ad82ca35f48a88472c Mon Sep 17 00:00:00 2001 From: Luther Wen Xu Date: Tue, 15 Oct 2019 23:34:51 +0800 Subject: [PATCH] go: Enforce react by user --- GoBot/discord/modules/react.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GoBot/discord/modules/react.go b/GoBot/discord/modules/react.go index ff81c7c..773dac4 100644 --- a/GoBot/discord/modules/react.go +++ b/GoBot/discord/modules/react.go @@ -28,6 +28,9 @@ func queueForReact(messageID string, acceptedEmoji []string, info interface{}, c } func CheckForReact(s *discordgo.Session, r *discordgo.MessageReactionAdd) { + if r.UserID == s.State.User.ID { + return + } entry, ok := reactCallbacks[r.MessageID] if !ok { return