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.

[Bug] Message.addReaction() crashes.

See original GitHub issue

What’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:closed
  • Created 2 years ago
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
Muha0644commented, Aug 17, 2021

Also you do know the whole point of bug reports it to complain? Deno crashed when I tried to send an alias, that is a bug. At least i would consider it a bug, since it literally crashed.

The whole point of bug reports is to report bugs/flaws in a program, this is clearly not a fault in Harmony as you used it wrong, would you say me writing

consol.log("hi")

and then Deno crashing is a bug in Deno? No, it’s a bug in my code, same situation here

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!

0reactions
DjDeveloperrcommented, Aug 17, 2021

For custom emotes you can either pass Emoji object, use the <a?:name:id> format or just name:id (note: this format only applies to reactions as per Discord docs).

Read more comments on GitHub >

github_iconTop 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 >

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