linkup-bot-lib
Version:
43 lines (42 loc) • 1.12 kB
TypeScript
/**
* @description Base class for all messages
* @since 1.0
* @author MiTask
* @module Message
*/
export declare class Message {
type: string;
peerName: string;
peerAvatar: string;
topic: string | null;
timestamp: number;
/**
* @since 1.0
* @author MiTask
* @constructor
* @param messageType Type of the message (text, file, audio, icon)
* @param peerName Peer username
* @param peerAvatar Peer avatar URL
* @param topic Chat room topic string
* @param timestamp UNIX Timestamp
*/
constructor(messageType: string, peerName: string, peerAvatar: string, topic: string | null, timestamp: number);
/**
* @since 1.0
* @author MiTask
* @returns JSON Object with all of the information about the message
*/
protected toJson(): {
name: String;
topic: String;
avatar: String;
type: String;
timestamp: Number;
};
/**
* @since 1.0
* @author MiTask
* @returns {string} JSON String with all of the information about the message
*/
toJsonString(): string;
}