From 4882b17a77484f801faa19fb971f2e6abd88e59f Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Sat, 20 Aug 2022 19:26:33 +0100 Subject: [PATCH] types: Disallow some channel types from webhook creation (#8531) types: disallow some channel types from webhook creation --- packages/discord.js/src/managers/GuildChannelManager.js | 2 +- packages/discord.js/typings/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/discord.js/src/managers/GuildChannelManager.js b/packages/discord.js/src/managers/GuildChannelManager.js index aa43dc350011..012821cfcd76 100644 --- a/packages/discord.js/src/managers/GuildChannelManager.js +++ b/packages/discord.js/src/managers/GuildChannelManager.js @@ -164,7 +164,7 @@ class GuildChannelManager extends CachedManager { /** * @typedef {ChannelWebhookCreateOptions} WebhookCreateOptions - * @property {GuildChannelResolvable} channel The channel to create the webhook for + * @property {TextChannel|NewsChannel|VoiceChannel|Snowflake} channel The channel to create the webhook for */ /** diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 9c6ba1a95427..720cc6c36c90 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -4152,7 +4152,7 @@ export interface ChannelWebhookCreateOptions { } export interface WebhookCreateOptions extends ChannelWebhookCreateOptions { - channel: GuildChannelResolvable; + channel: TextChannel | NewsChannel | VoiceChannel | Snowflake; } export interface ClientEvents {