fnbr
Version:
A library to interact with Epic Games' Fortnite HTTP and XMPP services
96 lines (95 loc) • 2.78 kB
TypeScript
import { Collection } from '@discordjs/collection';
import Base from '../../Base';
import ClientPartyMember from './ClientPartyMember';
import PartyMember from './PartyMember';
import PartyMeta from './PartyMeta';
import type Client from '../../Client';
import type { PartyConfig, PartyData, PartyUpdateData } from '../../../resources/structs';
/**
* Represents a party that the client is not a member of
*/
declare class Party extends Base {
/**
* The party's ID
*/
id: string;
/**
* The party's creation date
*/
createdAt: Date;
/**
* The party configuration
*/
config: PartyConfig;
/**
* A collection of the party members mapped by their ID
*/
members: Collection<string, PartyMember | ClientPartyMember>;
/**
* The party's meta
*/
meta: PartyMeta;
/**
* The party's revision
*/
revision: number;
/**
* @param client The main client
* @param data The party's data
*/
constructor(client: Client, data: PartyData);
/**
* The party's member count
*/
get size(): number;
/**
* The party's max member count
*/
get maxSize(): number;
/**
* The party's leader
*/
get leader(): PartyMember | ClientPartyMember | undefined;
/**
* The currently selected playlist
*/
get playlist(): import("../../../resources/structs").Island | undefined;
/**
* The custom matchmaking key
*/
get customMatchmakingKey(): string | undefined;
/**
* The squad fill status
*/
get squadFill(): boolean;
/**
* Joins this party
* @param skipRefresh Whether to skip refreshing the party data (Only use this if you know what you're doing)
* @throws {PartyAlreadyJoinedError} The client already joined this party
* @throws {PartyNotFoundError} The party wasn't found
* @throws {PartyPermissionError} The party cannot be fetched due to a permission error
* @throws {PartyMaxSizeReachedError} The party has reached its max size
* @throws {EpicgamesAPIError}
*/
join(skipRefresh?: boolean): Promise<void>;
/**
* Updates this party's data
*/
updateData(data: PartyUpdateData): void;
/**
* Updates the basic user information (display name and external auths) of all party members
*/
updateMemberBasicInfo(): Promise<void>;
/**
* Refetches this party's data
* @throws {PartyNotFoundError} The party wasn't found
* @throws {PartyPermissionError} The party cannot be fetched due to a permission error
* @throws {EpicgamesAPIError}
*/
fetch(): Promise<void>;
/**
* Converts this party into an object
*/
toObject(): PartyData;
}
export default Party;