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)
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!