UNPKG

@pubby/sdk

Version:
22 lines (21 loc) 714 B
import { ChatModule } from "."; import { ChatMessage } from "../../websocket/incoming/chat-message.event"; export declare class PubbyMessage { private readonly chat; id: string; text: string; timestamp: number; replyId?: string; fromId?: string; get user(): any; constructor(message: Partial<ChatMessage>, chat: ChatModule); send(): Promise<PubbyMessage>; reply(text: string): Promise<PubbyMessage>; remove(): Promise<unknown>; onReply(...listeners: ((message: PubbyMessage) => void)[]): { off: () => ChatModule; }; onceReply(callback: (message: PubbyMessage) => void, fromId?: string): { off: () => ChatModule; }; }