import { type MessageStructure, type ThreadChannelStructure } from '../../client/transformers'; import { type AllChannels, type GuildMember, type GuildRole } from '../../structures'; import { PermissionsBitField } from '../../structures/extra/Permissions'; import type { APIChannel, RESTGetAPIChannelMessagesPinsQuery, RESTGetAPIChannelMessagesQuery, RESTPatchAPIChannelJSONBody, RESTPutAPIChannelPermissionJSONBody } from '../../types'; import type { OmitInsert, PermissionStrings } from '../types/util'; import type { ThreadCreateBodyRequest } from '../types/write'; import { BaseShorter } from './base'; export declare class ChannelShorter extends BaseShorter { /** * Fetches a channel by its ID. * @param id The ID of the channel to fetch. * @param force Whether to force fetching the channel from the API even if it exists in the cache. * @returns A Promise that resolves to the fetched channel. */ fetch(id: string, force?: boolean): Promise; raw(id: string, force?: boolean): Promise; /** * Deletes a channel by its ID. * @param id The ID of the channel to delete. * @param optional Optional parameters for the deletion. * @returns A Promise that resolves to the deleted channel. */ delete(id: string, optional?: ChannelShorterOptionalParams): Promise; /** * Edits a channel by its ID. * @param id The ID of the channel to edit. * @param body The updated channel data. * @param optional Optional parameters for the editing. * @returns A Promise that resolves to the edited channel. */ edit(id: string, body: RESTPatchAPIChannelJSONBody, optional?: ChannelShorterOptionalParams): Promise; /** * Edits or creates a permission overwrite for a channel. * @param channelId The ID of the channel. * @param overwriteId The ID of the role or member overwrite. * @param body The overwrite payload. * @param optional Optional parameters including guild id and reason. */ editOverwrite(channelId: string, overwriteId: string, raw: ChannelShorterOverwriteBody, optional?: ChannelShorterOptionalParams): Promise; /** * Deletes a permission overwrite from a channel. * @param channelId The ID of the channel. * @param overwriteId The ID of the role or member overwrite. * @param optional Optional parameters including guild id and reason. */ deleteOverwrite(channelId: string, overwriteId: string, optional?: ChannelShorterOptionalParams): Promise; /** * Sends a typing indicator to the channel. * @param id The ID of the channel. * @returns A Promise that resolves when the typing indicator is successfully sent. */ typing(id: string): Promise; pins(channelId: string, query?: RESTGetAPIChannelMessagesPinsQuery): Promise<{ hasMore: boolean; items: { pinnedAt: number; message: MessageStructure; }[]; }>; /** * Pins a message in the channel. * @param messageId The ID of the message to pin. * @param channelId The ID of the channel. * @param reason The reason for pinning the message. * @returns A Promise that resolves when the message is successfully pinned. */ setPin(messageId: string, channelId: string, reason?: string): Promise; /** * Unpins a message in the channel. * @param messageId The ID of the message to unpin. * @param channelId The ID of the channel. * @param reason The reason for unpinning the message. * @returns A Promise that resolves when the message is successfully unpinned. */ deletePin(messageId: string, channelId: string, reason?: string): Promise; /** * Creates a new thread in the channel (only guild based channels). * @param channelId The ID of the parent channel. * @param reason The reason for unpinning the message. * @returns A promise that resolves when the thread is succesfully created. */ thread(channelId: string, body: ThreadCreateBodyRequest, reason?: string): Promise; memberPermissions(channelId: string, member: GuildMember, checkAdmin?: boolean): Promise; overwritesFor(channelId: string, member: GuildMember): Promise<{ everyone: { type: import("../..").OverwriteType; id: string; deny: PermissionsBitField; allow: PermissionsBitField; guildId: string; } | undefined; roles: { type: import("../..").OverwriteType; id: string; deny: PermissionsBitField; allow: PermissionsBitField; guildId: string; }[]; member: { type: import("../..").OverwriteType; id: string; deny: PermissionsBitField; allow: PermissionsBitField; guildId: string; } | undefined; }>; rolePermissions(channelId: string, role: GuildRole, checkAdmin?: boolean): Promise; fetchMessages(channelId: string, query?: RESTGetAPIChannelMessagesQuery): Promise; setVoiceStatus(channelId: string, status?: string | null): Promise; } export type ChannelShorterOptionalParams = Partial<{ guildId: (string & {}) | '@me'; reason: string; }>; export type ChannelShorterOverwriteBody = OmitInsert;