mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 04:53:30 +01:00
types: Disallow some channel types from webhook creation (#8535)
This commit is contained in:
@@ -175,7 +175,7 @@ class GuildChannelManager extends CachedManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a webhook for the channel.
|
* 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 {string} name The name of the webhook
|
||||||
* @param {ChannelWebhookCreateOptions} [options] Options for creating the webhook
|
* @param {ChannelWebhookCreateOptions} [options] Options for creating the webhook
|
||||||
* @returns {Promise<Webhook>} Returns the created Webhook
|
* @returns {Promise<Webhook>} Returns the created Webhook
|
||||||
|
|||||||
2
typings/index.d.ts
vendored
2
typings/index.d.ts
vendored
@@ -3229,7 +3229,7 @@ export class GuildChannelManager extends CachedManager<Snowflake, GuildBasedChan
|
|||||||
public createWebhook(
|
public createWebhook(
|
||||||
channel: GuildChannelResolvable,
|
channel: GuildChannelResolvable,
|
||||||
name: string,
|
name: string,
|
||||||
options?: ChannelWebhookCreateOptions,
|
options?: TextChannel | NewsChannel | VoiceChannel | Snowflake,
|
||||||
): Promise<Webhook>;
|
): Promise<Webhook>;
|
||||||
public edit(channel: GuildChannelResolvable, data: ChannelData, reason?: string): Promise<GuildChannel>;
|
public edit(channel: GuildChannelResolvable, data: ChannelData, reason?: string): Promise<GuildChannel>;
|
||||||
public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<NonThreadGuildBasedChannel | null>;
|
public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<NonThreadGuildBasedChannel | null>;
|
||||||
|
|||||||
Reference in New Issue
Block a user