aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord.js/BushThreadManager.d.ts
blob: 6822a806f88b0a0339e9dbb64c3f6abeba0f9801 (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
26
27
import type {
  BushThreadChannel
} from '#lib';
import {
  CachedManager,
  FetchedThreads,
  NewsChannel,
  TextChannel,
  ThreadChannel,
  type BaseFetchOptions,
  type FetchArchivedThreadOptions,
  type FetchThreadsOptions,
  type Snowflake,
  type ThreadChannelResolvable,
  type ThreadCreateOptions
} from 'discord.js';
import type { RawThreadChannelData } from 'discord.js/typings/rawDataTypes';

export class BushThreadManager<AllowedThreadType> extends CachedManager<Snowflake, BushThreadChannel, ThreadChannelResolvable> {
  public constructor(channel: TextChannel | NewsChannel, iterable?: Iterable<RawThreadChannelData>);
  public channel: TextChannel | NewsChannel;
  public create(options: ThreadCreateOptions<AllowedThreadType>): Promise<ThreadChannel>;
  public fetch(options: ThreadChannelResolvable, cacheOptions?: BaseFetchOptions): Promise<ThreadChannel | null>;
  public fetch(options?: FetchThreadsOptions, cacheOptions?: { cache?: boolean }): Promise<FetchedThreads>;
  public fetchArchived(options?: FetchArchivedThreadOptions, cache?: boolean): Promise<FetchedThreads>;
  public fetchActive(cache?: boolean): Promise<FetchedThreads>;
}