aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord.js/BushThreadManager.d.ts
blob: 027d5324eef9b97ed466db20320341cc8ba47347 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import {
	BaseFetchOptions,
	CachedManager,
	FetchArchivedThreadOptions,
	FetchThreadsOptions,
	Snowflake,
	ThreadChannelResolvable,
	ThreadCreateOptions
} from 'discord.js';
import { RawThreadChannelData } from 'discord.js/typings/rawDataTypes';
import { BushClient, BushFetchedThreads, BushThreadChannelResolvable } from '../discord-akairo/BushClient';
import { BushNewsChannel } from './BushNewsChannel';
import { BushTextChannel } from './BushTextChannel';
import { BushThreadChannel } from './BushThreadChannel';

export class BushThreadManager<AllowedThreadType> extends CachedManager<Snowflake, BushThreadChannel, ThreadChannelResolvable> {
	public constructor(channel: BushTextChannel | BushNewsChannel, iterable?: Iterable<RawThreadChannelData>);
	public declare readonly client: BushClient;
	public channel: BushTextChannel | BushNewsChannel;
	public create(options: ThreadCreateOptions<AllowedThreadType>): Promise<BushThreadChannel>;
	public fetch(options: BushThreadChannelResolvable, cacheOptions?: BaseFetchOptions): Promise<BushThreadChannel | null>;
	public fetch(options?: FetchThreadsOptions, cacheOptions?: { cache?: boolean }): Promise<BushFetchedThreads>;
	public fetchArchived(options?: FetchArchivedThreadOptions, cache?: boolean): Promise<BushFetchedThreads>;
	public fetchActive(cache?: boolean): Promise<BushFetchedThreads>;
}