Skip to content

Commit

Permalink
docs(ChannelManager): fetch can return Promise<null> (#5422)
Browse files Browse the repository at this point in the history
  • Loading branch information
advaith1 committed Mar 28, 2021
1 parent 8411b9e commit 1c8b109
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/managers/ChannelManager.js
Expand Up @@ -75,7 +75,7 @@ class ChannelManager extends BaseManager {
* @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} [force=false] Whether to skip the cache check and request the API
* @returns {Promise<Channel>}
* @returns {Promise<?Channel>}
* @example
* // Fetch a channel by its id
* client.channels.fetch('222109930545610754')
Expand Down
2 changes: 1 addition & 1 deletion typings/index.d.ts
Expand Up @@ -1893,7 +1893,7 @@ declare module 'discord.js' {

export class ChannelManager extends BaseManager<Snowflake, Channel, ChannelResolvable> {
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> {
Expand Down

0 comments on commit 1c8b109

Please sign in to comment.