33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
// Metro module 4086 (f4087).
|
|
import Record from "../lib/Record";
|
|
import { $callWithNewTarget } from "../_hermes/prelude";
|
|
class AppliedGuildBoostRecord extends Record {
|
|
constructor(a0) {
|
|
super();
|
|
this.id = a0.id;
|
|
this.guildId = a0.guildId;
|
|
this.userId = a0.userId;
|
|
this.user = a0.user;
|
|
this.ended = a0.ended;
|
|
this.endsAt = a0.endsAt != null ? a0.endsAt : null;
|
|
}
|
|
static createFromServer(a0) {
|
|
const { id, guild_id } = a0;
|
|
const userId = a0.user != null ? a0.user.id : a0.user_id;
|
|
const { user, ended } = a0;
|
|
const r17 = a0.ends_at != null ? a0.ends_at !== "" ? new Date(a0.ends_at) : null : null;
|
|
const prototypeOf = Object.getPrototypeOf(AppliedGuildBoostRecord);
|
|
const r27 = Object.create(AppliedGuildBoostRecord.prototype);
|
|
const r29 = $callWithNewTarget(prototypeOf, r27, AppliedGuildBoostRecord);
|
|
const r30 = r29 instanceof Object ? r29 : r27;
|
|
r30.id = id;
|
|
r30.guildId = guild_id;
|
|
r30.userId = userId;
|
|
r30.user = user;
|
|
r30.ended = ended;
|
|
r30.endsAt = r17 ?? null;
|
|
return r30;
|
|
}
|
|
}
|
|
export default AppliedGuildBoostRecord;
|