mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +01:00
docs(ChannelManager): fetch can return Promise<null> (#5422)
This commit is contained in:
@@ -75,7 +75,7 @@ class ChannelManager extends BaseManager {
|
|||||||
* @param {Snowflake} id ID of the channel
|
* @param {Snowflake} id ID of the channel
|
||||||
* @param {boolean} [cache=true] Whether to cache the new channel object if it isn't already
|
* @param {boolean} [cache=true] Whether to cache the new channel object if it isn't already
|
||||||
* @param {boolean} [force=false] Whether to skip the cache check and request the API
|
* @param {boolean} [force=false] Whether to skip the cache check and request the API
|
||||||
* @returns {Promise<Channel>}
|
* @returns {Promise<?Channel>}
|
||||||
* @example
|
* @example
|
||||||
* // Fetch a channel by its id
|
* // Fetch a channel by its id
|
||||||
* client.channels.fetch('222109930545610754')
|
* client.channels.fetch('222109930545610754')
|
||||||
|
|||||||
2
typings/index.d.ts
vendored
2
typings/index.d.ts
vendored
@@ -1893,7 +1893,7 @@ declare module 'discord.js' {
|
|||||||
|
|
||||||
export class ChannelManager extends BaseManager<Snowflake, Channel, ChannelResolvable> {
|
export class ChannelManager extends BaseManager<Snowflake, Channel, ChannelResolvable> {
|
||||||
constructor(client: Client, iterable: Iterable<any>);
|
constructor(client: Client, iterable: Iterable<any>);
|
||||||
public fetch(id: Snowflake, cache?: boolean, force?: boolean): Promise<Channel>;
|
public fetch(id: Snowflake, cache?: boolean, force?: boolean): Promise<Channel | null>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GuildChannelManager extends BaseManager<Snowflake, GuildChannel, GuildChannelResolvable> {
|
export class GuildChannelManager extends BaseManager<Snowflake, GuildChannel, GuildChannelResolvable> {
|
||||||
|
|||||||
Reference in New Issue
Block a user