fnbr
Version:
A library to interact with Epic Games' Fortnite HTTP and XMPP services
30 lines • 988 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const Base_1 = tslib_1.__importDefault(require("../../Base"));
/**
* Represents an incoming or outgoing party join request
*/
class BasePartyJoinRequest extends Base_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);
this.sender = sender;
this.receiver = receiver;
this.createdAt = new Date(data.sent_at);
this.expiresAt = new Date(data.expires_at);
}
/**
* Whether this join request expired
*/
get isExpired() {
return Date.now() > this.expiresAt.getTime();
}
}
exports.default = BasePartyJoinRequest;
//# sourceMappingURL=BasePartyJoinRequest.js.map