feat: thread channel

fix: ThreadManager#fetchArchived()
feat: ThreadChannel#firstMessage
todo: #486
This commit is contained in:
March 7th
2023-01-18 14:24:06 +07:00
parent 597eb2979c
commit 1e5e855ca0
3 changed files with 54 additions and 26 deletions
+12 -3
View File
@@ -2976,6 +2976,7 @@ export class TextInputComponent extends BaseMessageComponent {
export class ThreadChannel extends TextBasedChannelMixin(Channel, ['fetchWebhooks', 'createWebhook', 'setNSFW']) {
private constructor(guild: Guild, data?: RawThreadChannelData, client?: Client, fromInteraction?: boolean);
public archived: boolean | null;
public readonly firstMessage: Message | null;
public readonly archivedAt: Date | null;
public archiveTimestamp: number | null;
public readonly createdAt: Date | null;
@@ -4178,9 +4179,9 @@ export class ThreadManager extends CachedManager<Snowflake, ThreadChannel, Threa
protected constructor(channel: TextChannel | NewsChannel, iterable?: Iterable<RawThreadChannelData>);
public channel: TextChannel | NewsChannel;
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>;
public fetch(options?: FetchChannelThreadsOptions, cacheOptions?: { cache?: boolean }): Promise<FetchedThreads>;
public fetchArchived(options?: FetchChannelThreadsOptions, cache?: boolean): Promise<FetchedThreads>;
public fetchActive(cache?: boolean, options?: FetchChannelThreadsOptions): Promise<FetchedThreads>;
}
export class ThreadMemberManager extends CachedManager<Snowflake, ThreadMember, ThreadMemberResolvable> {
@@ -5708,6 +5709,14 @@ export interface FetchArchivedThreadOptions {
limit?: number;
}
export interface FetchChannelThreadsOptions {
archived?: boolean;
limit?: number;
offset?: number;
sort_by?: string;
sort_order?: string;
}
export interface FetchBanOptions extends BaseFetchOptions {
user: UserResolvable;
}