import { RequestTypes } from 'detritus-client-rest'; import { ShardClient, VoiceConnectObject, VoiceConnectOptions } from '../client'; import { BaseCollection } from '../collections/basecollection'; import { BaseSet } from '../collections/baseset'; import { ChannelTypes, ChannelVideoQualityModes } from '../constants'; import { PartialBy, PermissionTools, UrlQuery } from '../utils'; import { BaseStructure, BaseStructureData } from './basestructure'; import { Guild } from './guild'; import { Member } from './member'; import { Message } from './message'; import { Overwrite } from './overwrite'; import { Role } from './role'; import { StageInstance } from './stageinstance'; import { ThreadMember, ThreadMetadata } from './thread'; import { Typing } from './typing'; import { User } from './user'; import { VoiceState } from './voicestate'; export declare type Channel = (ChannelBase | ChannelDM | ChannelGuildVoice | ChannelDMGroup | ChannelGuildType); export declare type ChannelGuildType = (ChannelGuildBase | ChannelGuildCategory | ChannelGuildText | ChannelGuildStore | ChannelGuildThread | ChannelGuildStageVoice); export declare type ChannelTextType = (ChannelDM | ChannelDMGroup | ChannelGuildText | ChannelGuildThread); export declare function createChannelFromData(client: ShardClient, data?: BaseStructureData, isClone?: boolean): Channel; /** * Basic Channel Structure * @category Structure */ export declare class ChannelBase extends BaseStructure { readonly _keys: BaseSet; readonly _keysMerge: BaseSet; _name: string; _nicks?: BaseCollection; _nsfw?: boolean; _permissionOverwrites?: BaseCollection; _recipients?: BaseCollection; applicationId?: string; bitrate?: number; deleted: boolean; guildId?: string; id: string; icon?: null | string; isPartial: boolean; lastMessageId?: null | string; lastPinTimestampUnix?: number; member?: ThreadMember; memberCount?: number; messageCount?: number; ownerId?: string; parentId?: null | string; position?: number; rateLimitPerUser?: number; rtcRegion?: null | string; threadMetadata?: ThreadMetadata; topic: null | string; type: ChannelTypes; userLimit?: number; videoQualityMode?: ChannelVideoQualityModes; constructor(client: ShardClient, data?: BaseStructureData, isClone?: boolean); get canAddReactions(): boolean; get canAttachFiles(): boolean; get canDeafenMembers(): boolean; get canEdit(): boolean; get canEmbedLinks(): boolean; get canJoin(): boolean; get canManageMessages(): boolean; get canManageWebhooks(): boolean; get canMentionEveryone(): boolean; get canMessage(): boolean; get canManageThreads(): boolean; get canMoveMembers(): boolean; get canMuteMembers(): boolean; get canPrioritySpeaker(): boolean; get canSendTTSMessage(): boolean; get canSpeak(): boolean; get canStream(): boolean; get canReadHistory(): boolean; get canUseExternalEmojis(): boolean; get canUsePrivateThreads(): boolean; get canUsePublicThreads(): boolean; get canUseVAD(): boolean; get canView(): boolean; get children(): BaseCollection; get createdAt(): Date; get createdAtUnix(): number; get defaultIconUrl(): null | string; get guild(): Guild | null; get iconUrl(): null | string; get isDm(): boolean; get isDmGroup(): boolean; get isDmSingle(): boolean; get isGuildCategory(): boolean; get isGuildChannel(): boolean; get isGuildNews(): boolean; get isGuildStageVoice(): boolean; get isGuildStore(): boolean; get isGuildText(): boolean; get isGuildThread(): boolean; get isGuildThreadNews(): boolean; get isGuildThreadPrivate(): boolean; get isGuildThreadPublic(): boolean; get isGuildVoice(): boolean; get isLive(): boolean; get isManaged(): boolean; get isSyncedWithParent(): boolean; get isText(): boolean; get isVoice(): boolean; get joined(): boolean; get jumpLink(): string; get lastMessage(): Message | null; get lastPinTimestamp(): Date | null; get members(): BaseCollection; get messages(): BaseCollection; get mention(): string; get name(): string; get nicks(): BaseCollection; get nsfw(): boolean; get owner(): User | null; get parent(): ChannelGuildCategory | ChannelGuildText | null; get permissionOverwrites(): BaseCollection; get stageInstance(): StageInstance | null; get recipients(): BaseCollection; get typing(): BaseCollection; get voiceStates(): BaseCollection; can(permissions: PermissionTools.PermissionChecks, memberOrRole?: Member | Role): boolean; iconUrlFormat(format?: null | string, query?: UrlQuery): null | string; isSyncedWith(parent: ChannelGuildCategory | null): boolean; addPinnedMessage(messageId: string): Promise; addMember(userId: string): Promise; addRecipient(userId: string): Promise; bulkDelete(messageIds: Array): Promise; close(): Promise; createInvite(options: RequestTypes.CreateChannelInvite): Promise; createMessage(options?: RequestTypes.CreateMessage | string): Promise; createReaction(messageId: string, emoji: string): Promise; createStageInstance(options: PartialBy): Promise; createThread(options: RequestTypes.CreateChannelThread): Promise; createWebhook(options: RequestTypes.CreateWebhook): Promise; crosspostMessage(messageId: string): Promise; delete(options?: RequestTypes.DeleteChannel): Promise; deleteMessage(messageId: string, options?: RequestTypes.DeleteMessage): Promise; deleteOverwrite(overwriteId: string, options?: RequestTypes.DeleteChannelOverwrite): Promise; deletePin(messageId: string): Promise; deleteReaction(messageId: string, emoji: string, userId?: string): Promise; deleteReactions(messageId: string): Promise; deleteStageInstance(): Promise; edit(options?: RequestTypes.EditChannel): Promise; editMessage(messageId: string, options?: RequestTypes.EditMessage): Promise; editOverwrite(overwriteId: string, options?: RequestTypes.EditChannelOverwrite): Promise; editStageInstance(options?: RequestTypes.EditStageInstance): Promise; fetchCallStatus(): Promise; fetchInvites(): Promise>; fetchMembers(): Promise>; fetchMessage(messageId: string): Promise; fetchMessages(options?: RequestTypes.FetchMessages): Promise>; fetchPins(): Promise>; fetchReactions(messageId: string, emoji: string, options?: RequestTypes.FetchReactions): Promise>; fetchStageInstance(): Promise; fetchStoreListing(): Promise; fetchThreadsActive(): Promise; fetchThreadsArchivedPrivate(options?: RequestTypes.FetchChannelThreadsArchivedPrivate): Promise; fetchThreadsArchivedPrivateJoined(options?: RequestTypes.FetchChannelThreadsArchivedPrivateJoined): Promise; fetchThreadsArchivedPublic(options?: RequestTypes.FetchChannelThreadsArchivedPublic): Promise; fetchWebhooks(): Promise>; follow(options: RequestTypes.FollowChannel): Promise<{ channelId: string; webhookId: string; }>; grantEntitlement(): Promise; join(): Promise; join(options?: CallOptions): Promise; leave(): Promise; removeMember(userId: string): Promise; removeRecipient(userId: string): Promise; search(options: RequestTypes.SearchOptions, retry?: boolean): Promise; startCallRinging(recipients?: Array): Promise; stopCallRinging(recipients?: Array): Promise; triggerTyping(): Promise; turnIntoNewsChannel(): Promise; turnIntoTextChannel(): Promise; unack(): Promise; mergeValue(key: string, value: any): void; toString(): string; } export interface CallOptions extends VoiceConnectOptions { recipients?: Array; verify?: boolean; } /** * Single DM Channel * @category Structure */ export declare class ChannelDM extends ChannelBase { readonly _keys: BaseSet; type: ChannelTypes; lastMessageId?: null | string; constructor(client: ShardClient, data?: BaseStructureData, isClone?: boolean); get iconUrl(): null | string; get joined(): boolean; get messages(): BaseCollection; get name(): string; get voiceStates(): BaseCollection; iconUrlFormat(format?: null | string, query?: UrlQuery): null | string; mergeValue(key: string, value: any): void; } /** * Group DM Channel * @category Structure */ export declare class ChannelDMGroup extends ChannelDM { readonly _keys: BaseSet; type: ChannelTypes; applicationId?: string; icon: null | string; ownerId: string; constructor(client: ShardClient, data?: BaseStructureData, isClone?: boolean); get defaultIconUrl(): string; get owner(): User | null; iconUrlFormat(format?: null | string, query?: UrlQuery): string; isOwner(userId: string): boolean; } /** * Basic Guild Channel * @category Structure */ export declare class ChannelGuildBase extends ChannelBase { readonly _keys: BaseSet; readonly _keysMerge: BaseSet; type: ChannelTypes; guildId: string; parentId: null | string; position: number; rateLimitPerUser: number; constructor(client: ShardClient, data?: BaseStructureData, isClone?: boolean); get canAddReactions(): boolean; get canAttachFiles(): boolean; get canDeafenMembers(): boolean; get canEdit(): boolean; get canEmbedLinks(): boolean; get canJoin(): boolean; get canManageMessages(): boolean; get canManageWebhooks(): boolean; get canManageThreads(): boolean; get canMentionEveryone(): boolean; get canMessage(): boolean; get canMoveMembers(): boolean; get canMuteMembers(): boolean; get canPrioritySpeaker(): boolean; get canSendTTSMessage(): boolean; get canSpeak(): boolean; get canStream(): boolean; get canReadHistory(): boolean; get canUseExternalEmojis(): boolean; get canUsePrivateThreads(): boolean; get canUsePublicThreads(): boolean; get canUseVAD(): boolean; get canView(): boolean; get guild(): Guild | null; get jumpLink(): string; can(permissions: PermissionTools.PermissionChecks, memberOrRole?: Member | Role, { ignoreAdministrator, ignoreOwner }?: { ignoreAdministrator?: boolean; ignoreOwner?: boolean; }): boolean; isSyncedWith(parent: ChannelGuildCategory | null): boolean; mergeValue(key: string, value: any): void; } /** * Guild Category Channel * @category Structure */ export declare class ChannelGuildCategory extends ChannelGuildBase { readonly _keys: BaseSet; type: ChannelTypes; constructor(client: ShardClient, data?: BaseStructureData, isClone?: boolean); get children(): BaseCollection; } /** * Guild Text Channel, it can also be a news channel. * @category Structure */ export declare class ChannelGuildText extends ChannelGuildBase { readonly _keys: BaseSet; type: ChannelTypes; lastMessageId: null | string; topic: null | string; constructor(client: ShardClient, data?: BaseStructureData, isClone?: boolean); get members(): BaseCollection; get messages(): BaseCollection; mergeValue(key: string, value: any): void; } /** * Guild Voice Channel * @category Structure */ export declare class ChannelGuildVoice extends ChannelGuildBase { readonly _keys: BaseSet; type: ChannelTypes; bitrate: number; rtcRegion: string | null; userLimit: number; videoQualityMode: ChannelVideoQualityModes; constructor(client: ShardClient, data?: BaseStructureData, isClone?: boolean); get joined(): boolean; get members(): BaseCollection; get voiceStates(): BaseCollection; } /** * Guild Store Channel * @category Structure */ export declare class ChannelGuildStore extends ChannelGuildBase { readonly _keys: BaseSet; type: ChannelTypes; bitrate: number; userLimit: number; constructor(client: ShardClient, data?: BaseStructureData, isClone?: boolean); } /** * Guild Stage Voice Channel * @category Structure */ export declare class ChannelGuildStageVoice extends ChannelGuildVoice { readonly _keys: BaseSet; type: ChannelTypes; topic: null | string; constructor(client: ShardClient, data?: BaseStructureData, isClone?: boolean); } /** * Guild Thread Channel * @category Structure */ export declare class ChannelGuildThread extends ChannelGuildBase { readonly _keys: BaseSet; type: ChannelTypes; member?: ThreadMember; memberCount: number; messageCount: number; ownerId: string; threadMetadata: ThreadMetadata; constructor(client: ShardClient, data?: BaseStructureData, isClone?: boolean); get nsfw(): boolean; mergeValue(key: string, value: any): void; }