fnbr
Version:
A library to interact with Epic Games' Fortnite HTTP and XMPP services
33 lines • 1.14 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const Base_1 = tslib_1.__importDefault(require("../../Base"));
/**
* Represents a party invitation (either incoming or outgoing)
*/
class BasePartyInvitation extends Base_1.default {
/**
* @param client The main client
* @param party The party this invitation belongs to
* @param sender The friend (or the client user) who sent this invitation
* @param receiver The friend (or the client user) who received this invitation
* @param data The invitation data
*/
constructor(client, party, sender, receiver, data) {
super(client);
this.party = party;
this.sender = sender;
this.receiver = receiver;
this.createdAt = new Date(data.sent_at);
this.expiresAt = new Date(data.expires_at);
this.isHandled = false;
}
/**
* Whether this invitation expired
*/
get isExpired() {
return Date.now() > this.expiresAt.getTime();
}
}
exports.default = BasePartyInvitation;
//# sourceMappingURL=BasePartyInvitation.js.map