fnbr
Version:
A library to interact with Epic Games' Fortnite HTTP and XMPP services
31 lines (30 loc) • 1.25 kB
TypeScript
import Base from '../Base';
import type { ChatMessagePayload } from '../../resources/structs';
/**
* Represent's the client's chat manager (dm, party chat) via eos.
*/
declare class ChatManager extends Base {
/**
* Returns the chat namespace, this is the eos deployment id
*/
get namespace(): string;
/**
* Sends a private message to the specified user
* @param user the account id or displayname
* @param message the message object
* @returns the message id
* @throws {UserNotFoundError} When the specified user was not found
* @throws {EpicgamesAPIError} When the api request failed
*/
whisperUser(user: string, message: ChatMessagePayload): Promise<string>;
/**
* Sends a message in the specified conversation (party chat)
* @param conversationId the conversation id, usually `p-[PARTYID]`
* @param message the message object
* @param allowedRecipients the account ids, that should receive the message
* @returns the message id
* @throws {EpicgamesAPIError} When the api request failed
*/
sendMessageInConversation(conversationId: string, message: ChatMessagePayload, allowedRecipients: string[]): Promise<string>;
}
export default ChatManager;