types: Disallow some channel types from webhook creation (#8535)

This commit is contained in:
Jiralite
2022-08-22 08:46:17 +01:00
committed by GitHub
parent 526ea74e66
commit 10b12ccea6
2 changed files with 2 additions and 2 deletions

View File

@@ -175,7 +175,7 @@ class GuildChannelManager extends CachedManager {
/**
* Creates a webhook for the channel.
* @param {GuildChannelResolvable} channel The channel to create the webhook for
* @param {TextChannel|NewsChannel|VoiceChannel|Snowflake} channel The channel to create the webhook for
* @param {string} name The name of the webhook
* @param {ChannelWebhookCreateOptions} [options] Options for creating the webhook
* @returns {Promise<Webhook>} Returns the created Webhook

2
typings/index.d.ts vendored
View File

@@ -3229,7 +3229,7 @@ export class GuildChannelManager extends CachedManager<Snowflake, GuildBasedChan
public createWebhook(
channel: GuildChannelResolvable,
name: string,
options?: ChannelWebhookCreateOptions,
options?: TextChannel | NewsChannel | VoiceChannel | Snowflake,
): Promise<Webhook>;
public edit(channel: GuildChannelResolvable, data: ChannelData, reason?: string): Promise<GuildChannel>;
public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<NonThreadGuildBasedChannel | null>;