import { type APIChannel, type ChannelFlags, ChannelType } from "discord-api-types/v10"; import type { Client } from "../classes/Client.js"; import type { DMBasedChannel, GuildBasedChannel, SendableChannel, ThreadChannel, ThreadOnlyChannel } from "../types/channels.js"; import type { IfPartial } from "../types/index.js"; import { Base } from "./Base.js"; export declare abstract class BaseChannel extends Base { constructor(client: Client, rawDataOrId: IsPartial extends true ? string : Extract, type?: Type); /** * The raw data of the channel. */ protected _rawData: Extract | null; private _type; protected setData(data: Extract): void; protected setField(field: keyof Extract, value: unknown): void; /** * The raw Discord API data for this channel */ get rawData(): Readonly>; /** * The id of the channel. */ readonly id: string; /** * Whether the channel is a partial channel (meaning it does not have all the data). * If this is true, you should use {@link BaseChannel.fetch} to get the full data of the channel. */ get partial(): IsPartial; /** * The type of the channel. */ get type(): IfPartial; /** * Whether this is a DM-based channel. */ isDMBased(): this is Extract>; /** * Whether this is a guild channel. */ isGuildBased(): this is Extract>; /** * Whether this channel is a thread. */ isThread(): this is Extract>; /** * Whether this channel is thread-only (forum/media). */ isThreadOnly(): this is Extract>; /** * Whether this channel can be sent to directly. */ isSendable(): this is Extract>; /** * The flags of the channel in a bitfield. * @see https://discord.com/developers/docs/resources/channel#channel-object-channel-flags */ get flags(): IfPartial; /** * Fetches the channel from the API. * @returns A Promise that resolves to a non-partial channel */ fetch(): Promise>; /** * Delete the channel */ delete(): Promise; /** * Returns the Discord mention format for this channel * @returns The mention string in the format <#channelId> */ toString(): string; } //# sourceMappingURL=BaseChannel.d.ts.map