import { ITranscriptData } from "./Browser"; import Client from "./Client"; import Room from "./Room"; import User from "./User"; interface Message { [x: string]: unknown; } /** * Represents a message that was sent in a chatroom * @class */ declare class Message { #private; id: number | undefined; /** * @summary Creates an instance of Message. * @param {Client} client The client associated with this message (undefined if not a message type) * @param {number|undefined} id The ID of the message * @param {Partial} attrs Extra attributes that should be assigned to this message * @constructor */ constructor(client: Client, id: number | undefined, attrs?: Partial); /** * The room associated with this message * * @readonly * @type {Promise} * @memberof Message */ get room(): Promise; /** * The room ID associated with this message * * @readonly * @type {Promise} * @memberof Message */ get roomId(): Promise; /** * The actual text content of the message. This will be raw HTML as * parsed by the server * * @readonly * @type {Promise} * @memberof Message */ get content(): Promise; /** * The user associated with this message * * @readonly * @type {Promise} * @memberof Message */ get user(): Promise; get parentMessageId(): Promise; private _setRoom; /** * Send a reply to this message, replying to the user * (This will ping the user) * * @param {string} message The message to send * @returns {Promise} A promise that contains the Message object that was sent * @throws {InvalidArgumentError} If message > 500 character, empty, or isn't a string. * @memberof Message */ reply(message: string): Promise; /** * Fetches the parent message from this message, or undefined * if there is no message * * @returns {Promise} Promise * @memberof Message */ parent(): Promise; } export default Message;