import type { BushClient, BushCommandUtil, BushGuild, BushGuildMember, BushGuildTextBasedChannel, BushMessageReaction, BushTextBasedChannel, BushThreadChannel, BushUser } from '#lib'; import { ActionRowComponent, Message, type EmojiIdentifierResolvable, type If, type MessageEditOptions, type MessagePayload, type Partialize, type ReplyMessageOptions, type StartThreadOptions } from 'discord.js'; import type { RawMessageData } from 'discord.js/typings/rawDataTypes'; export type PartialBushMessage = Partialize< BushMessage, 'type' | 'system' | 'pinned' | 'tts', 'content' | 'cleanContent' | 'author' >; /** * Represents a message on Discord. */ export class BushMessage extends Message { public declare readonly client: BushClient; public declare util: BushCommandUtil>; public declare readonly guild: If; public declare readonly member: BushGuildMember | null; public declare author: BushUser; public declare readonly channel: If; public constructor(client: BushClient, data: RawMessageData) { super(client, data); } } export interface BushMessage extends Message { delete(): Promise; edit(content: string | MessageEditOptions | MessagePayload): Promise; equals(message: BushMessage, rawData: unknown): boolean; fetchReference(): Promise; crosspost(): Promise; fetch(force?: boolean): Promise; pin(): Promise; react(emoji: EmojiIdentifierResolvable): Promise; removeAttachments(): Promise; reply(options: string | MessagePayload | ReplyMessageOptions): Promise; resolveComponent(customId: string): ActionRowComponent | null; startThread(options: StartThreadOptions): Promise; suppressEmbeds(suppress?: boolean): Promise; unpin(): Promise; inGuild(): this is BushMessage & this; }