Unrecognized event: MESSAGE_REACTION_REMOVE_EMOJI
See original GitHub issueGeneral 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:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top 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 MessageReactionRemoveEmojiEventArgs
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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Issue fixed with version
4.3.0_333
I agree with @DManstrator. Try making a PR for it 😃