From 4419232fe9108171d91284b2810544abc2ee5305 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sun, 8 Aug 2021 14:41:29 +0200 Subject: [PATCH] Fix: To remove unicode emojis the emoji must be passed Signed-off-by: Knut Ahlers --- mod_reactionRole.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mod_reactionRole.go b/mod_reactionRole.go index f9e7703..5463edd 100644 --- a/mod_reactionRole.go +++ b/mod_reactionRole.go @@ -133,7 +133,12 @@ func (m modReactionRole) Setup() error { okCode := str.StringInSlice(compiledName, reactionList) if !okCode && !okName { - if err = m.discord.MessageReactionsRemoveEmoji(channelID, managedMsg.ID, r.Emoji.ID); err != nil { + id := r.Emoji.ID + if id == "" { + id = r.Emoji.Name + } + + if err = m.discord.MessageReactionsRemoveEmoji(channelID, managedMsg.ID, id); err != nil { return errors.Wrap(err, "removing reaction emoji") } continue