From fc390ffc300334c396d9d06b0feaf8fbc6ed2814 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 26 Dec 2021 17:16:32 -0500 Subject: documentation, bug fixes etc --- .../extensions/discord.js/BushChannelManager.d.ts | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src/lib/extensions/discord.js/BushChannelManager.d.ts') diff --git a/src/lib/extensions/discord.js/BushChannelManager.d.ts b/src/lib/extensions/discord.js/BushChannelManager.d.ts index 843b956..514cdd3 100644 --- a/src/lib/extensions/discord.js/BushChannelManager.d.ts +++ b/src/lib/extensions/discord.js/BushChannelManager.d.ts @@ -1,8 +1,22 @@ -import type { BushChannel, BushChannelResolvable } from '#lib'; +import type { BushAnyChannel, BushChannelResolvable } from '#lib'; import { CachedManager, type Client, type FetchChannelOptions, type Snowflake } from 'discord.js'; import type { RawChannelData } from 'discord.js/typings/rawDataTypes'; -export class BushChannelManager extends CachedManager { +/** + * A manager of channels belonging to a client + */ +export class BushChannelManager extends CachedManager { public constructor(client: Client, iterable: Iterable); - public fetch(id: Snowflake, options?: FetchChannelOptions): Promise; + + /** + * Obtains a channel from Discord, or the channel cache if it's already available. + * @param id The channel's id + * @param options Additional options for this fetch + * @example + * // Fetch a channel by its id + * client.channels.fetch('222109930545610754') + * .then(channel => console.log(channel.name)) + * .catch(console.error); + */ + public fetch(id: Snowflake, options?: FetchChannelOptions): Promise; } -- cgit