/** @module ForumChannel */ import GuildChannel from "./GuildChannel"; import PermissionOverwrite from "./PermissionOverwrite"; import PublicThreadChannel from "./PublicThreadChannel"; import type Invite from "./Invite"; import type Member from "./Member"; import Permission from "./Permission"; import type CategoryChannel from "./CategoryChannel"; import type Webhook from "./Webhook"; import type Client from "../Client"; import type { ArchivedThreads, CreateInviteOptions, EditForumChannelOptions, EditPermissionOptions, ForumEmoji, ForumTag, GetArchivedThreadsOptions, RawForumChannel, RawOverwrite, RawPublicThreadChannel, StartThreadInForumOptions } from "../types/channels"; import type { JSONForumChannel } from "../types/json"; import TypedCollection from "../util/TypedCollection"; import { type SortOrderTypes, type ForumLayoutTypes, type ChannelTypes, type ThreadAutoArchiveDuration } from "../Constants"; /** Represents a forum channel. */ export default class ForumChannel extends GuildChannel { /** The usable tags for threads. */ availableTags: Array; /** The default auto archive duration for threads. */ defaultAutoArchiveDuration: ThreadAutoArchiveDuration; /** The default forum layout used to display threads. */ defaultForumLayout: ForumLayoutTypes; /** The default reaction emoji for threads. */ defaultReactionEmoji: ForumEmoji | null; /** The default sort order mode used to sort threads. */ defaultSortOrder: SortOrderTypes | null; /** The default amount of seconds between non-moderators sending messages in threads. */ defaultThreadRateLimitPerUser: number; /** The flags for this channel, see {@link Constants.ChannelFlags}. */ flags: number; /** The most recently created thread. */ lastThread?: PublicThreadChannel | null; /** The ID of most recently created thread. */ lastThreadID: string | null; /** If this channel is age gated. */ nsfw: boolean; /** The permission overwrites of this channel. */ permissionOverwrites: TypedCollection; /** The position of this channel on the sidebar. */ position: number; /** The amount of seconds between non-moderators creating threads. */ rateLimitPerUser: number; /** Undocumented property. */ template: string; /** The threads in this channel. */ threads: TypedCollection; /** The `guidelines` of this forum channel. */ topic: string | null; type: ChannelTypes.GUILD_FORUM; constructor(data: RawForumChannel, client: Client); protected update(data: Partial): void; get parent(): CategoryChannel | null | undefined; /** * Create an invite for this channel. * @param options The options for the invite. */ createInvite(options: CreateInviteOptions): Promise>; /** * Delete a permission overwrite on this channel. * @param overwriteID The ID of the permission overwrite to delete. * @param reason The reason for deleting the permission overwrite. */ deletePermission(overwriteID: string, reason?: string): Promise; /** * Edit this channel. * @param options The options for editing the channel */ edit(options: EditForumChannelOptions): Promise; /** * Edit a permission overwrite on this channel. * @param overwriteID The ID of the permission overwrite to edit. * @param options The options for editing the permission overwrite. */ editPermission(overwriteID: string, options: EditPermissionOptions): Promise; /** * Get the invites of this channel. */ getInvites(): Promise>>; /** * Get the public archived threads in this channel. * @param options The options for getting the public archived threads. */ getPublicArchivedThreads(options?: GetArchivedThreadsOptions): Promise>; /** * Get the webhooks in this channel. */ getWebhooks(): Promise>; /** * Get the permissions of a member. If providing an id, the member must be cached. * @param member The member to get the permissions of. */ permissionsOf(member: string | Member): Permission; /** * Create a thread in a forum channel. * @param options The options for starting the thread. */ startThread(options: StartThreadInForumOptions): Promise; toJSON(): JSONForumChannel; }