UNPKG

linkup-bot-lib

Version:

46 lines (45 loc) 1.52 kB
/** * @module Message */ /// <reference types="node" /> import { Message } from "./Message"; import { Client } from "../Client"; export declare class FileMessage extends Message { fileName: string; fileUrl: string; fileType: string; fileData: string; /** * @description Creates a new file message. * @since 1.0 * @author MiTask * @constructor * @param peerName Peer username * @param peerAvatar Peer avatar URL * @param topic Chat room topic string * @param timestamp UNIX Timestamp * @param fileName File name * @param fileUrl URL to the file * @param fileType Type of the file * @param fileData File data in base64 String format */ constructor(peerName: string, peerAvatar: string, topic: string | null, timestamp: number, fileName: string, fileUrl: string, fileType: string, fileData: string); /** * @since 1.0 * @author MiTask * @returns {String} JSON String with all of the information about the message */ toJsonString(): string; /** * @description Creates a new file message instance. * @since 1.0 * @author MiTask * @param bot Bot Client class * @param fileName File name * @param fileUrl URL to the file * @param fileType Type of the file * @param fileBuffer File data * @returns {FileMessage} FileMessage instance. */ static new(bot: Client, fileName: string, fileUrl: string, fileType: string, fileBuffer: Buffer): FileMessage; }