mirror of
https://github.com/idanoo/GoDiscMoji
synced 2025-07-02 02:42:15 +00:00
Fix emojiID/Name issue
This commit is contained in:
parent
215b30b41f
commit
de5ae550e0
2 changed files with 9 additions and 3 deletions
|
@ -268,7 +268,12 @@ func purgeRecentEmojis(s *discordgo.Session, i *discordgo.InteractionCreate) {
|
|||
|
||||
x := 0
|
||||
for _, emoji := range emojis {
|
||||
err := s.MessageReactionRemove(emoji.ChannelID, emoji.MessageID, emoji.EmojiID, emoji.UserID)
|
||||
emojiID := emoji.EmojiID
|
||||
if emojiID == "" {
|
||||
emojiID = emoji.EmojiName
|
||||
}
|
||||
|
||||
err := s.MessageReactionRemove(emoji.ChannelID, emoji.MessageID, emojiID, emoji.UserID)
|
||||
if err != nil {
|
||||
slog.Error("Error removing emoji reaction", "err", err, "emoji", emoji.EmojiID, "user", user.ID)
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue