@fnlb-project/fnbr
Version:
A library to interact with Epic Games' Fortnite HTTP and XMPP services
31 lines • 1.18 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const BasePartyJoinRequest_1 = tslib_1.__importDefault(require("./BasePartyJoinRequest"));
/**
* Represents an incoming party join request
*/
class ReceivedPartyJoinRequest extends BasePartyJoinRequest_1.default {
/**
* @param client The main client
* @param sender The user who requested to join the party
* @param receiver The user who received the join request
* @param data The party confirmation data
*/
constructor(client, sender, receiver, data) {
super(client, sender, receiver, data);
this.sender = sender;
this.receiver = receiver;
}
/**
* Accepts the join request. If it expired, a normal invite will be sent
* @throws {PartyAlreadyJoinedError} The user is already a member of this party
* @throws {PartyMaxSizeReachedError} The party reached its max size
* @throws {EpicgamesAPIError}
*/
async accept() {
return this.client.invite(this.sender.id);
}
}
exports.default = ReceivedPartyJoinRequest;
//# sourceMappingURL=ReceivedPartyJoinRequest.js.map