mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
fix(Client): don't auth for webhook fetches with token (#8709)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -313,7 +313,7 @@ class Client extends BaseClient {
|
|||||||
* .catch(console.error);
|
* .catch(console.error);
|
||||||
*/
|
*/
|
||||||
async fetchWebhook(id, token) {
|
async fetchWebhook(id, token) {
|
||||||
const data = await this.rest.get(Routes.webhook(id, token));
|
const data = await this.rest.get(Routes.webhook(id, token), { auth: typeof token === 'undefined' });
|
||||||
return new Webhook(this, { token, ...data });
|
return new Webhook(this, { token, ...data });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user