question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unrecognized event: MESSAGE_REACTION_REMOVE_EMOJI

See original GitHub issue

General Troubleshooting

  • I have checked for similar issues.
  • I have updated to the latest JDA version.
  • I have checked the branches or the maintainers’ PRs for upcoming bug fixes.

Bug Report

After calling Message#clearReactions(String unicode) with the emote encoded as Unicode characters, I receive this error message:

2021-09-30 22:58:59.691 DEBUG 7756 --- [inWS-ReadThread] n.d.j.internal.requests.WebSocketClient  : Unrecognized event:
{"op":0,"s":40,"t":"MESSAGE_REACTION_REMOVE_EMOJI","d":{"emoji":{"name":"⬇️","id":null},"guild_id":"254236409706053632","message_id":"893240468891119636","channel_id":"259021952767754250"}}

Since the event MESSAGE_REACTION_REMOVE_EMOTE is registered here, I’d assume Discord is inconsistent with it’s event naming and MESSAGE_REACTION_REMOVE_EMOJI should be handled just like MESSAGE_REACTION_REMOVE_EMOTE. Therefore both events should be registered for processing by the same handler implementation (or this is considered a bug on discord’s side).

Expected Behavior

No error should occur and the eventhandlers should be called accordingly.

Code Example or Reproduction Steps

fun main() {
    val jda = JDABuilder
        .createDefault(token)
        .setActivity(Activity.of(Activity.ActivityType.DEFAULT, "..."))
        .setAudioPool(Executors.newScheduledThreadPool(4))
        .setAutoReconnect(true)
        .setEnableShutdownHook(true)
        .setStatus(OnlineStatus.ONLINE)
        .addEventListeners(listener)
        .build()

    jda.awaitReady()
    val slightSmileEmoji = "\uD83D\uDE42"
    val msg = jda
        .getGuildById("") // Any guild
        ?.getTextChannelById("") // Any text Channel
        ?.sendMessage("example")
        ?.complete()
    msg?.clearReactions(slightSmileEmoji)?.complete()
}

val listener = object : ListenerAdapter() {
    override fun onMessageReactionRemove(event: MessageReactionRemoveEvent) {
        LoggerFactory.getLogger("test").info("removed")
    }
}

For reproducing the method Message#clearReactions has to be called (just removing your own reaction does not work). The listener is in this example is never called.

Code for JDABuilder or DefaultShardManagerBuilder Used

JDABuilder
            .createDefault(token)
            .setActivity(Activity.of(Activity.ActivityType.DEFAULT, "..."))
            .setAudioPool(Executors.newScheduledThreadPool(4))
            .setAutoReconnect(true)
            .setEnableShutdownHook(true)
            .setStatus(OnlineStatus.ONLINE)
            .addEventListeners(*listeners.toTypedArray())
            .build()

Exception or Error

2021-09-30 22:58:59.691 DEBUG 7756 --- [inWS-ReadThread] n.d.j.internal.requests.WebSocketClient  : Unrecognized event:
{"op":0,"s":40,"t":"MESSAGE_REACTION_REMOVE_EMOJI","d":{"emoji":{"name":"⬇️","id":null},"guild_id":"254236409706053632","message_id":"893240468891119636","channel_id":"259021952767754250"}}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Menkaliancommented, Oct 3, 2021

Issue fixed with version 4.3.0_333

0reactions
DV8FromTheWorldcommented, Oct 3, 2021

I agree with @DManstrator. Try making a PR for it 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

10007: Unknown Member when trying to remove a reaction on ...
Hi there,. I got a small issue when trying to remove a reaction when a users leaves the server. When trying to remove...
Read more >
Twitter: How to Remove a Reaction in a DM - Adweek
Step 1: In a Twitter DM, tap the reaction emoji you want to delete. image. Step 2: Tap “Undo” to remove the reaction...
Read more >
How do you have a Discord bot remove a user reaction to a ...
1 Answer 1 ... You can use either Message.remove_reaction or Reaction.remove . A Reaction object represents a specific emoji reaction to a Message...
Read more >
Class Message​Reaction​Remove​Emoji​Event​Args
Gets the message that had the removed reactions. Declaration. public DiscordMessage Message { get; }. Property Value ...
Read more >
How to disable "Emoji's Reactions" for all the attendees at an ...
Step 1: Go to the settings tab placed towards the right-side top corner. Step 2: Click on the “Customize event” button. Step 3:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found