aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord.js/BushChannelManager.d.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-26 17:16:32 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-26 17:16:32 -0500
commitfc390ffc300334c396d9d06b0feaf8fbc6ed2814 (patch)
treea6282a74cf99033291ac7bc9de123ae273d528d2 /src/lib/extensions/discord.js/BushChannelManager.d.ts
parent062435590980b87f5b054418ed88604e26358ae9 (diff)
downloadtanzanite-fc390ffc300334c396d9d06b0feaf8fbc6ed2814.tar.gz
tanzanite-fc390ffc300334c396d9d06b0feaf8fbc6ed2814.tar.bz2
tanzanite-fc390ffc300334c396d9d06b0feaf8fbc6ed2814.zip
documentation, bug fixes etc
Diffstat (limited to 'src/lib/extensions/discord.js/BushChannelManager.d.ts')
-rw-r--r--src/lib/extensions/discord.js/BushChannelManager.d.ts20
1 files changed, 17 insertions, 3 deletions
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<Snowflake, BushChannel, BushChannelResolvable> {
+/**
+ * A manager of channels belonging to a client
+ */
+export class BushChannelManager extends CachedManager<Snowflake, BushAnyChannel, BushChannelResolvable> {
public constructor(client: Client, iterable: Iterable<RawChannelData>);
- public fetch(id: Snowflake, options?: FetchChannelOptions): Promise<BushChannel | null>;
+
+ /**
+ * 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<BushAnyChannel | null>;
}