mirror of
https://github.com/Luzifer/discord-community.git
synced 2024-12-20 10:21:22 +00:00
Fix: To remove unicode emojis the emoji must be passed
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
0345d3c90f
commit
4419232fe9
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue