UNPKG

hackmud-chat

Version:
29 lines 799 B
import { Channel } from "./channel"; import { HackmudApi } from "./hackmud.api"; /** * Represents a account user. */ export declare class User { /** * The name of the user. */ name: string; /** * The channels this user has joined. */ channels: Channel[]; private api; constructor(api: HackmudApi, name: string, channels: Channel[]); /** * Returns the user channel from the given name. * @param name The channel name. */ getChannelByName(name: string): Channel; /** * Send a message to another user. * @param user The user to send the message to. * @param msg The content of the message. */ send(user: string, msg: string): Promise<void>; } //# sourceMappingURL=user.d.ts.map