jb3 / webhook-discord

A simple Javascript file for nicely formatting Discord webhooks
MIT License
101 stars 38 forks source link

GET on webhook not returning `token` in response #69

Open jamiechapman opened 3 years ago

jamiechapman commented 3 years ago

It appears that token is no longer returning by Discord (see https://github.com/discord/discord-api-docs/issues/3056) when using Discord webhooks generated by a bot. This causes the following issue:

UnhandledPromiseRejectionWarning: Error: 401 Unauthorized
    at [redacted]/node_modules/snekfetch/src/index.js:195:23
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

Does anyone have any recommended solutions for obtaining a token using this library?

jb3 commented 3 years ago

I'm not sure I follow. If you specify a full webhook URL in the constructor it should contain the webhook token, so the response should include it as well right?