Fix: To remove unicode emojis the emoji must be passed

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-08-08 14:41:29 +02:00
parent 0345d3c90f
commit 4419232fe9
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

View file

@ -133,7 +133,12 @@ func (m modReactionRole) Setup() error {
okCode := str.StringInSlice(compiledName, reactionList) okCode := str.StringInSlice(compiledName, reactionList)
if !okCode && !okName { 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") return errors.Wrap(err, "removing reaction emoji")
} }
continue continue