mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
feat(Message): prevent fetching an interaction webhook. (#6468)
This commit is contained in:
@@ -788,6 +788,7 @@ class Message extends Base {
|
||||
*/
|
||||
fetchWebhook() {
|
||||
if (!this.webhookId) return Promise.reject(new Error('WEBHOOK_MESSAGE'));
|
||||
if (this.webhookId === this.applicationId) return Promise.reject(new Error('WEBHOOK_APPLICATION'));
|
||||
return this.client.fetchWebhook(this.webhookId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user