harmony: [Bug] Message.addReaction() crashes.

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.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18 (11 by maintainers)

Most upvoted comments

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!