[Bug] Message.addReaction() crashes.
See original GitHub issueWhat’s the bug?
Message.addReaction()
crashes with of http error 411 when sending an emoji.
How do we reproduce it?
use Message.addReaction("flushed")
(same if you specify “:flushed:”).
What should have happened? Instead of sending a reaction to the message, the it crashes deno completely.
What is actually happening?
PUT https://discord.com/api/v9/channels/*number*/messages/*another number*/reactions/flushed/@me returned 411
(unknown) undefined
throw new DiscordAPIError({
^
at BucketHandler.execute (https://deno.land/x/harmony@v2.0.0/src/rest/bucket.ts:217:13)
at async BucketHandler.push (https://deno.land/x/harmony@v2.0.0/src/rest/bucket.ts:51:14)
at async RESTManager.make (https://deno.land/x/harmony@v2.0.0/src/rest/manager.ts:236:12)
at async RESTManager.put (https://deno.land/x/harmony@v2.0.0/src/rest/manager.ts:339:12)
at async GuildTextChannel.addReaction (https://deno.land/x/harmony@v2.0.0/src/structures/textChannel.ts:90:5)
What versions you’re using?
- OS: Arch Linux (btw)
- Deno: 1.13.0
- Harmony: 2.0.0
Do you have anything to tell us more about the bug? Mozilla docs say 411 means Length Required. I’m 90% sure i’m using the method right because this is a http error, not a TS or Deno error.
Issue Analytics
- State:
- Created 2 years ago
- Comments:18 (11 by maintainers)
Top Results From Across the Web
Crash on reaction add #2325 - Rapptz/discord.py - GitHub
Bot crashes when somebody adds a reaction to a message. No appropriate callbacks are provided (I am using only on_message callback).
Read more >Discord crashes every time I remove a reaction someone else ...
Discord crashes every time I remove a reaction someone else posts on a message in a server that I moderate; is it just...
Read more >DiscordJS V12 Reactions not Catching Error - Stack Overflow
One solution is to use Promise.all() .then((m) => Promise.all([m.react("✓"), m.react("⚠️")])). In short, it takes an array of promises ...
Read more >BUG: Automation client receives an error message or crashes ...
BUG : Automation client receives an error message or crashes when the client calls the Find object in Word. Symptoms. When you use...
Read more >Messages crashed when opened | Apple Developer Forums
I'm currently on the version iOS 10 (14A5309d) on my iPhone and when I open Messages, it freezes for about 5 seconds, then...
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 FreeTop 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
Top GitHub Comments
Wait, you program without an IDE? Because an IDE would definitely tell you about the error. What I did threw a http error, not a logic error. The IDE did not say anything was wrong with my code. Anyway, since i have the docs and some advice I think I can make something work. I don’t usually do typescript, I’m a C++ kind of guy. Everyone tells me C++ is dying and I can’t get a job with it but I still like it for it’s performance.
Thanks for the help everyone. Again, good luck with v3!
For custom emotes you can either pass Emoji object, use the
<a?:name:id>
format or justname:id
(note: this format only applies to reactions as per Discord docs).