import { Collection, type RawFile, type ReturnCache } from '..';
import type { Overwrites } from '../cache/resources/overwrites';
import { type BaseChannelStructure, type BaseGuildChannelStructure, type CategoryChannelStructure, type DMChannelStructure, type DirectoryChannelStructure, type ForumChannelStructure, type GuildMemberStructure, type GuildStructure, type MediaChannelStructure, type MessageStructure, type NewsChannelStructure, type StageChannelStructure, type TextGuildChannelStructure, type ThreadChannelStructure, type UserStructure, type VoiceChannelStructure, type VoiceStateStructure, type WebhookStructure } from '../client';
import type { UsingClient } from '../commands';
import { type EmojiResolvable, type MessageCreateBodyRequest, type MessageUpdateBodyRequest, type MethodContext, type ObjectToLower, type StringToNumber, type ToClass } from '../common';
import { type APIChannelBase, type APIDMChannel, type APIGuildCategoryChannel, type APIGuildChannel, type APIGuildForumChannel, type APIGuildForumDefaultReactionEmoji, type APIGuildForumTag, type APIGuildMediaChannel, type APIGuildStageVoiceChannel, type APIGuildVoiceChannel, type APINewsChannel, type APITextChannel, type APIThreadChannel, ChannelType, type RESTGetAPIChannelMessageReactionUsersQuery, type RESTGetAPIChannelMessagesQuery, type RESTPatchAPIChannelJSONBody, type RESTPatchAPIGuildChannelPositionsJSONBody, type RESTPostAPIChannelWebhookJSONBody, type RESTPostAPIGuildChannelJSONBody, type RESTPostAPIGuildForumThreadsJSONBody, type SortOrderType, type ThreadAutoArchiveDuration, VideoQualityMode } from '../types';
import type { GuildMember } from './GuildMember';
import type { GuildRole } from './GuildRole';
import { DiscordBase } from './extra/DiscordBase';
export declare class BaseNoEditableChannel<T extends ChannelType> extends DiscordBase<APIChannelBase<ChannelType>> {
    type: T;
    constructor(client: UsingClient, data: APIChannelBase<ChannelType>);
    static __intent__(id: '@me'): 'DirectMessages';
    static __intent__(id: string): 'DirectMessages' | 'Guilds';
    /** The URL to the channel */
    get url(): string;
    fetch(force?: boolean): Promise<AllChannels>;
    delete(reason?: string): Promise<AllChannels>;
    toString(): `<#${string}>`;
    isStage(): this is StageChannel;
    isMedia(): this is MediaChannel;
    isDM(): this is DMChannel;
    isForum(): this is ForumChannel;
    isThread(): this is ThreadChannel;
    isDirectory(): this is DirectoryChannel;
    isVoice(): this is VoiceChannel;
    isTextGuild(): this is TextGuildChannel;
    isCategory(): this is CategoryChannel;
    isNews(): this is NewsChannel;
    isTextable(): this is AllTextableChannels;
    isGuildTextable(): this is AllGuildTextableChannels;
    isThreadOnly(): this is ForumChannel | MediaChannel;
    is<T extends (keyof IChannelTypes)[]>(channelTypes: T): this is IChannelTypes[T[number]];
    static allMethods(ctx: MethodContext<{
        guildId: string;
    }>): {
        list: (force?: boolean) => Promise<AllChannels[]>;
        fetch: (id: string, force?: boolean) => Promise<AllChannels>;
        create: (body: RESTPostAPIGuildChannelJSONBody) => Promise<AllChannels>;
        delete: (id: string, reason?: string) => Promise<AllChannels>;
        edit: (id: string, body: RESTPatchAPIChannelJSONBody, reason?: string) => Promise<AllChannels>;
        editPositions: (body: RESTPatchAPIGuildChannelPositionsJSONBody) => Promise<never>;
    };
}
export declare class BaseChannel<T extends ChannelType> extends BaseNoEditableChannel<T> {
    edit(body: RESTPatchAPIChannelJSONBody, reason?: string): Promise<this>;
}
interface IChannelTypes {
    GuildStageVoice: StageChannel;
    GuildMedia: MediaChannel;
    DM: DMChannel;
    GuildForum: ForumChannel;
    AnnouncementThread: ThreadChannel;
    PrivateThread: ThreadChannel;
    PublicThread: ThreadChannel;
    GuildDirectory: DirectoryChannel;
    GuildVoice: VoiceChannel;
    GuildText: TextGuildChannel;
    GuildCategory: CategoryChannel;
    GuildAnnouncement: NewsChannel;
}
export interface BaseGuildChannel extends ObjectToLower<Omit<APIGuildChannel<ChannelType>, 'permission_overwrites'>> {
}
export declare class BaseGuildChannel extends BaseChannel<ChannelType> {
    constructor(client: UsingClient, data: APIGuildChannel<ChannelType>);
    permissionOverwrites: {
        fetch: () => ReturnType<Overwrites["get"]>;
        values: () => ReturnCache<ReturnType<Overwrites["values"]>>;
    };
    memberPermissions(member: GuildMember, checkAdmin?: boolean): Promise<import("./extra/Permissions").PermissionsBitField>;
    rolePermissions(role: GuildRole, checkAdmin?: boolean): Promise<import("./extra/Permissions").PermissionsBitField>;
    overwritesFor(member: GuildMember): Promise<{
        everyone: {
            type: number;
            id: string;
            deny: import("./extra/Permissions").PermissionsBitField;
            allow: import("./extra/Permissions").PermissionsBitField;
            guildId: string;
        } | undefined;
        roles: {
            type: number;
            id: string;
            deny: import("./extra/Permissions").PermissionsBitField;
            allow: import("./extra/Permissions").PermissionsBitField;
            guildId: string;
        }[];
        member: {
            type: number;
            id: string;
            deny: import("./extra/Permissions").PermissionsBitField;
            allow: import("./extra/Permissions").PermissionsBitField;
            guildId: string;
        } | undefined;
    }>;
    guild(force?: boolean): Promise<GuildStructure<'api'>>;
    get url(): string;
    setPosition(position: number, reason?: string): Promise<this>;
    setName(name: string, reason?: string): Promise<this>;
    setParent(parent_id: string | null, reason?: string): Promise<this>;
    setRatelimitPerUser(rate_limit_per_user: number | null | undefined): Promise<this>;
    setNsfw(nsfw?: boolean, reason?: string): Promise<this>;
}
export interface MessagesMethods extends BaseNoEditableChannel<ChannelType> {
}
export declare class MessagesMethods extends DiscordBase {
    typing(): Promise<void>;
    messages: {
        write: (body: MessageCreateBodyRequest) => Promise<MessageStructure>;
        edit: (messageId: string, body: MessageUpdateBodyRequest) => Promise<MessageStructure>;
        crosspost: (messageId: string, reason?: string) => Promise<MessageStructure>;
        delete: (messageId: string, reason?: string) => Promise<void>;
        fetch: (messageId: string, force?: boolean) => Promise<MessageStructure>;
        purge: (messages: string[], reason?: string) => Promise<void | undefined>;
        list: (fetchOptions: RESTGetAPIChannelMessagesQuery) => Promise<MessageStructure[]>;
    };
    pins: {
        fetch: () => Promise<MessageStructure[]>;
        set: (messageId: string, reason?: string) => Promise<never>;
        delete: (messageId: string, reason?: string) => Promise<never>;
    };
    reactions: {
        add: (messageId: string, emoji: EmojiResolvable) => Promise<void>;
        delete: (messageId: string, emoji: EmojiResolvable, userId?: string) => Promise<void>;
        fetch: (messageId: string, emoji: EmojiResolvable, query?: RESTGetAPIChannelMessageReactionUsersQuery) => Promise<UserStructure[]>;
        purge: (messageId: string, emoji?: EmojiResolvable) => Promise<void>;
    };
    static messages(ctx: MethodContext<{
        channelId: string;
    }>): {
        write: (body: MessageCreateBodyRequest) => Promise<MessageStructure>;
        edit: (messageId: string, body: MessageUpdateBodyRequest) => Promise<MessageStructure>;
        crosspost: (messageId: string, reason?: string) => Promise<MessageStructure>;
        delete: (messageId: string, reason?: string) => Promise<void>;
        fetch: (messageId: string, force?: boolean) => Promise<MessageStructure>;
        purge: (messages: string[], reason?: string) => Promise<void | undefined>;
        list: (fetchOptions: RESTGetAPIChannelMessagesQuery) => Promise<MessageStructure[]>;
    };
    static reactions(ctx: MethodContext<{
        channelId: string;
    }>): {
        add: (messageId: string, emoji: EmojiResolvable) => Promise<void>;
        delete: (messageId: string, emoji: EmojiResolvable, userId?: string) => Promise<void>;
        fetch: (messageId: string, emoji: EmojiResolvable, query?: RESTGetAPIChannelMessageReactionUsersQuery) => Promise<UserStructure[]>;
        purge: (messageId: string, emoji?: EmojiResolvable) => Promise<void>;
    };
    static pins(ctx: MethodContext<{
        channelId: string;
    }>): {
        fetch: () => Promise<MessageStructure[]>;
        set: (messageId: string, reason?: string) => Promise<never>;
        delete: (messageId: string, reason?: string) => Promise<never>;
    };
    static transformMessageBody<T>(body: MessageCreateBodyRequest | MessageUpdateBodyRequest, files: RawFile[] | undefined, self: UsingClient): T;
}
export interface TextBaseGuildChannel extends ObjectToLower<Omit<APITextChannel, 'type' | 'permission_overwrites'>>, MessagesMethods {
}
export declare class TextBaseGuildChannel extends BaseGuildChannel {
}
export declare function channelFrom(data: APIChannelBase<ChannelType>, client: UsingClient): AllChannels;
export interface TopicableGuildChannel extends BaseChannel<ChannelType> {
}
export declare class TopicableGuildChannel extends DiscordBase {
    setTopic(topic: string | null, reason?: string): Promise<this>;
}
export interface ThreadOnlyMethods extends BaseChannel<ChannelType>, TopicableGuildChannel {
}
export declare class ThreadOnlyMethods extends DiscordBase {
    setTags(tags: APIGuildForumTag[], reason?: string): Promise<this>;
    setAutoArchiveDuration(duration: ThreadAutoArchiveDuration, reason?: string): Promise<this>;
    setReactionEmoji(emoji: APIGuildForumDefaultReactionEmoji, reason?: string): Promise<this>;
    setSortOrder(sort: SortOrderType, reason?: string): Promise<this>;
    setThreadRateLimit(rate: number, reason?: string): Promise<this>;
    thread(body: RESTPostAPIGuildForumThreadsJSONBody, reason?: string): Promise<ThreadChannelStructure>;
}
export interface VoiceChannelMethods extends BaseChannel<ChannelType> {
    guildId?: string;
}
export declare class VoiceChannelMethods extends DiscordBase {
    setBitrate(bitrate: number | null, reason?: string): Promise<this>;
    setUserLimit(user_limit: number | null, reason?: string): Promise<this>;
    setRTC(rtc_region: string | null, reason?: string): Promise<this>;
    setVideoQuality(quality: keyof typeof VideoQualityMode, reason?: string): Promise<this>;
    setVoiceStatus(status?: string | null): Promise<never>;
    states(): ReturnCache<VoiceStateStructure[]>;
    members(force?: boolean): Promise<Collection<string, GuildMemberStructure>>;
}
export declare class WebhookGuildMethods extends DiscordBase {
    webhooks: {
        list: () => Promise<WebhookStructure[]>;
    };
    static guild(ctx: MethodContext<{
        guildId: string;
    }>): {
        list: () => Promise<WebhookStructure[]>;
    };
}
export declare class WebhookChannelMethods extends DiscordBase {
    webhooks: {
        list: () => Promise<WebhookStructure[]>;
        create: (body: RESTPostAPIChannelWebhookJSONBody) => Promise<WebhookStructure>;
    };
    static channel(ctx: MethodContext<{
        channelId: string;
    }>): {
        list: () => Promise<WebhookStructure[]>;
        create: (body: RESTPostAPIChannelWebhookJSONBody) => Promise<WebhookStructure>;
    };
}
export interface TextGuildChannel extends ObjectToLower<Omit<APITextChannel, 'type' | 'permission_overwrites'>>, BaseGuildChannel, TextBaseGuildChannel, WebhookChannelMethods {
}
export declare class TextGuildChannel extends BaseGuildChannel {
    type: ChannelType.GuildText;
}
export interface DMChannel extends ObjectToLower<APIDMChannel>, MessagesMethods {
}
export declare class DMChannel extends BaseNoEditableChannel<ChannelType.DM> {
    type: ChannelType.DM;
}
export interface VoiceChannel extends ObjectToLower<Omit<APIGuildVoiceChannel, 'permission_overwrites'>>, Omit<TextGuildChannel, keyof BaseGuildChannel>, VoiceChannelMethods, WebhookChannelMethods {
}
export declare class VoiceChannel extends BaseGuildChannel {
    type: ChannelType.GuildVoice;
}
export interface StageChannel extends ObjectToLower<Omit<APIGuildStageVoiceChannel, 'type' | 'permission_overwrites'>>, TopicableGuildChannel, VoiceChannelMethods {
}
export declare class StageChannel extends BaseGuildChannel {
    type: ChannelType.GuildStageVoice;
}
export interface MediaChannel extends ObjectToLower<Omit<APIGuildMediaChannel, 'type' | 'permission_overwrites'>>, ThreadOnlyMethods {
}
export declare class MediaChannel extends BaseGuildChannel {
    type: ChannelType.GuildMedia;
}
export interface ForumChannel extends ObjectToLower<Omit<APIGuildForumChannel, 'permission_overwrites'>>, Omit<ThreadOnlyMethods, 'type' | 'edit'>, WebhookChannelMethods {
}
export declare class ForumChannel extends BaseGuildChannel {
    type: ChannelType.GuildForum;
}
export interface ThreadChannel extends ObjectToLower<Omit<APIThreadChannel, 'permission_overwrites'>>, Omit<TextBaseGuildChannel, 'edit' | 'parentId'> {
}
export declare class ThreadChannel extends BaseChannel<ChannelType.PublicThread | ChannelType.AnnouncementThread | ChannelType.PrivateThread> {
    parentId: string;
    type: ChannelType.PublicThread | ChannelType.AnnouncementThread | ChannelType.PrivateThread;
    webhooks: {
        list: () => Promise<WebhookStructure[]>;
        create: (body: RESTPostAPIChannelWebhookJSONBody) => Promise<WebhookStructure>;
    };
    join(): Promise<this>;
    leave(): Promise<this>;
    setRatelimitPerUser(rate_limit_per_user: number | null | undefined): Promise<this>;
    pin(reason?: string): Promise<this>;
    unpin(reason?: string): Promise<this>;
    setTags(applied_tags: string[], reason?: string): Promise<this>;
    setArchived(archived?: boolean, reason?: string): Promise<this>;
    setAutoArchiveDuration(auto_archive_duration: StringToNumber<`${ThreadAutoArchiveDuration}`>, reason?: string): Promise<this>;
    setInvitable(invitable?: boolean, reason?: string): Promise<this>;
    setLocked(locked?: boolean, reason?: string): Promise<this>;
}
export interface CategoryChannel extends ObjectToLower<Omit<APIGuildCategoryChannel, 'permission_overwrites'>> {
}
declare const CategoryChannel_base: ToClass<Omit<BaseGuildChannel, "setParent" | "type">, CategoryChannel>;
export declare class CategoryChannel extends CategoryChannel_base {
    type: ChannelType.GuildCategory;
}
export interface NewsChannel extends ObjectToLower<Omit<APINewsChannel, 'permission_overwrites'>>, WebhookChannelMethods, Omit<TextGuildChannel, keyof BaseGuildChannel> {
}
export declare class NewsChannel extends BaseGuildChannel {
    type: ChannelType.GuildAnnouncement;
    addFollower(webhookChannelId: string, reason?: string): Promise<import("../types").APIFollowedChannel>;
}
export declare class DirectoryChannel extends BaseChannel<ChannelType.GuildDirectory> {
}
export type AllGuildChannels = TextGuildChannelStructure | VoiceChannelStructure | MediaChannelStructure | ForumChannelStructure | ThreadChannelStructure | CategoryChannelStructure | NewsChannelStructure | DirectoryChannelStructure | StageChannelStructure;
export type AllTextableChannels = TextGuildChannelStructure | VoiceChannelStructure | DMChannelStructure | NewsChannelStructure | ThreadChannelStructure;
export type AllGuildTextableChannels = TextGuildChannelStructure | VoiceChannelStructure | NewsChannelStructure | ThreadChannelStructure;
export type AllGuildVoiceChannels = VoiceChannelStructure | StageChannelStructure;
export type AllChannels = BaseChannelStructure | BaseGuildChannelStructure | TextGuildChannelStructure | DMChannelStructure | VoiceChannelStructure | MediaChannelStructure | ForumChannelStructure | ThreadChannelStructure | CategoryChannelStructure | NewsChannelStructure | DirectoryChannelStructure | StageChannelStructure;
export {};
