import { RequestTypes } from 'detritus-client-rest'; import { ShardClient } from '../client'; import { BaseCollection } from '../collections/basecollection'; import { BaseSet } from '../collections/baseset'; import { InteractionTypes, MessageComponentButtonStyles, MessageComponentTypes, MessageTypes } from '../constants'; import { BaseStructure, BaseStructureData } from './basestructure'; import { Application } from './application'; import { Attachment } from './attachment'; import { Channel, ChannelGuildThread, ChannelTextType } from './channel'; import { Emoji } from './emoji'; import { Guild } from './guild'; import { Member } from './member'; import { MessageEmbed } from './messageembed'; import { PresenceActivity } from './presence'; import { Reaction } from './reaction'; import { Role } from './role'; import { Sticker, StickerItem } from './sticker'; import { User } from './user'; export interface MessageReplyOptions extends RequestTypes.CreateMessage { reference?: boolean; } /** * Channel Message Structure * @category Structure */ export declare class Message extends BaseStructure { readonly _keys: BaseSet; readonly _keysMerge: BaseSet; readonly _keysSkipDifference: BaseSet; _content: string; _attachments?: BaseCollection; _components?: BaseCollection; _embeds?: BaseCollection; _mentions?: BaseCollection; _mentionChannels?: BaseCollection; _mentionRoles?: BaseCollection; _reactions?: BaseCollection; _stickers?: BaseCollection; _stickerItems?: BaseCollection; activity?: MessageActivity; application?: Application; author: User; call?: MessageCall; channelId: string; content: string; deleted: boolean; editedTimestampUnix: number; flags: number; guildId?: string; id: string; interaction?: MessageInteraction; member?: Member; mentionEveryone: boolean; messageReference?: MessageReference; nonce?: string; pinned: boolean; referencedMessage: Message | null; thread?: ChannelGuildThread; timestampUnix: number; tts: boolean; type: MessageTypes; webhookId?: string; constructor(client: ShardClient, data?: BaseStructureData, isClone?: boolean); get attachments(): BaseCollection; get canDelete(): boolean; get canEdit(): boolean; get canManage(): boolean; get canReact(): boolean; get canReadHistory(): boolean; get canReply(): boolean; get channel(): ChannelTextType | null; get components(): BaseCollection; get createdAt(): Date; get createdAtUnix(): number; get editedAt(): Date | null; get editedAtUnix(): number; get editedTimestamp(): Date | null; get embeds(): BaseCollection; get fromBot(): boolean; get fromMe(): boolean; get fromSystem(): boolean; get fromUser(): boolean; get fromWebhook(): boolean; get guild(): Guild | null; get hasAttachment(): boolean; get hasFlagCrossposted(): boolean; get hasFlagEphemeral(): boolean; get hasFlagIsCrossposted(): boolean; get hasFlagSuppressEmbeds(): boolean; get inDm(): boolean; get isEdited(): boolean; get isReply(): boolean; get jumpLink(): string; get mentionHere(): boolean; get mentions(): BaseCollection; get mentionChannels(): BaseCollection; get mentionRoles(): BaseCollection; get reactions(): BaseCollection; get stickers(): BaseCollection; get stickerItems(): BaseCollection; get systemContent(): string; get timestamp(): Date; convertContent(options?: { escapeMentions?: boolean; guildSpecific?: boolean; nick?: boolean; text?: string; }): string; hasFlag(flag: number): boolean; ack(token: string): Promise; createThread(options: RequestTypes.CreateChannelMessageThread): Promise; crosspost(): Promise; delete(options?: RequestTypes.DeleteMessage): Promise; deleteReaction(emoji: string, userId?: string): Promise; deleteReactions(): Promise; edit(options?: RequestTypes.EditMessage | string): Promise; fetchReactions(emoji: string, options?: RequestTypes.FetchReactions): Promise>; pin(): Promise; publish(options: RequestTypes.CreateApplicationNews): Promise; react(emoji: string): Promise; removeMention(): Promise; reply(options?: MessageReplyOptions | string): Promise; triggerTyping(): Promise; unpin(): Promise; difference(key: string, value: any): [boolean, any]; mergeValue(key: string, value: any): void; toString(): string; } /** * Channel Message Activity Structure, used for inviting people to listen/join * @category Structure */ export declare class MessageActivity extends BaseStructure { readonly _uncloneable = true; readonly _keys: BaseSet; readonly message: Message; coverImage: null | string; name: null | string; partyId: string; type: number; constructor(message: Message, data: BaseStructureData); get activity(): null | PresenceActivity; get group(): BaseCollection; } /** * Channel Message Call Structure, used to define the call properties in the DM it's from * Used to format the content * @category Structure */ export declare class MessageCall extends BaseStructure { readonly _uncloneable = true; readonly _keys: BaseSet; readonly message: Message; endedTimestamp: Date | null; participants: Array; constructor(message: Message, data: BaseStructureData); get duration(): number; get isEnded(): boolean; mergeValue(key: string, value: any): void; } /** * Channel Message Component Action Row Structure * @category Structure */ export declare class MessageComponentActionRow extends BaseStructure { readonly _uncloneable = true; readonly _keys: BaseSet; readonly message: Message; components: BaseCollection; type: MessageComponentTypes; constructor(message: Message, data: BaseStructureData); mergeValue(key: string, value: any): void; } /** * Channel Message Component Structure * @category Structure */ export declare class MessageComponent extends BaseStructure { readonly _uncloneable = true; readonly _keys: BaseSet; readonly message: Message; customId?: string; disabled?: boolean; emoji?: Emoji; label?: string; style?: MessageComponentButtonStyles; type: MessageComponentTypes; url?: string; constructor(message: Message, data: BaseStructureData); get id(): string; mergeValue(key: string, value: any): void; } /** * Channel Message Component Select Menu Structure * @category Structure */ export declare class MessageComponentSelectMenu extends BaseStructure { readonly _uncloneable = true; readonly _keys: BaseSet; readonly message: Message; customId: string; maxValues: number; minValues: number; options: BaseCollection; placeholder: string; type: MessageComponentTypes.SELECT_MENU; constructor(message: Message, data: BaseStructureData); get id(): string; mergeValue(key: string, value: any): void; } /** * Channel Message Component Select Menu Structure * @category Structure */ export declare class MessageComponentSelectMenuOption extends BaseStructure { readonly _uncloneable = true; readonly _keys: BaseSet; readonly message: Message; default: boolean; description?: string; emoji?: Emoji; label: string; value: string; constructor(message: Message, data: BaseStructureData); mergeValue(key: string, value: any): void; } /** * Channel Message Interaction Structure * @category Structure */ export declare class MessageInteraction extends BaseStructure { readonly _uncloneable = true; readonly _keys: BaseSet; readonly message: Message; id: string; name: string; type: InteractionTypes; user: User; constructor(message: Message, data: BaseStructureData); mergeValue(key: string, value: any): void; } /** * Channel Message Reference Structure, used to tell the client that this is from a server webhook or a reply * Used for crossposts * @category Structure */ export declare class MessageReference extends BaseStructure { readonly _uncloneable = true; readonly _keys: BaseSet; readonly parent: Message; channelId: string; guildId?: string; messageId?: string; constructor(message: Message, data: BaseStructureData); get channel(): ChannelTextType | null; get guild(): null | Guild; get message(): null | Message; } export declare function messageSystemContent(message: Message, text?: string): string;