mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-04 22:16:08 +00:00
fix: Number.parseInt() -> Date.parse() oops
This commit is contained in:
parent
0d9bda3b5d
commit
2c4fcaad83
@ -1147,8 +1147,8 @@ export class ChannelFactory {
|
|||||||
return {
|
return {
|
||||||
id: v.id,
|
id: v.id,
|
||||||
type: v.type,
|
type: v.type,
|
||||||
allow: new Permissions(parseInt(v.allow!)),
|
allow: new Permissions(Number.parseInt(v.allow!)),
|
||||||
deny: new Permissions(parseInt(v.deny!)),
|
deny: new Permissions(Number.parseInt(v.deny!)),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ export class Invite {
|
|||||||
: undefined;
|
: undefined;
|
||||||
this.code = data.code;
|
this.code = data.code;
|
||||||
this.expiresAt = data.expires_at
|
this.expiresAt = data.expires_at
|
||||||
? Number.parseInt(data.expires_at)
|
? Date.parse(data.expires_at)
|
||||||
: undefined;
|
: undefined;
|
||||||
this.inviter = data.inviter
|
this.inviter = data.inviter
|
||||||
? new User(session, data.inviter)
|
? new User(session, data.inviter)
|
||||||
|
@ -32,18 +32,18 @@ export class Member implements Model {
|
|||||||
|
|
||||||
this.nickname = data.nick ? data.nick : undefined;
|
this.nickname = data.nick ? data.nick : undefined;
|
||||||
this.premiumSince = data.premium_since
|
this.premiumSince = data.premium_since
|
||||||
? Number.parseInt(data.premium_since)
|
? Date.parse(data.premium_since)
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
this.channelPermissions = data.permissions ? new Permissions(BigInt(data.permissions)) : undefined;
|
this.channelPermissions = data.permissions ? new Permissions(BigInt(data.permissions)) : undefined;
|
||||||
this.joinedTimestamp = Number.parseInt(data.joined_at);
|
this.joinedTimestamp = Date.parse(data.joined_at);
|
||||||
this.roles = data.roles;
|
this.roles = data.roles;
|
||||||
this.deaf = !!data.deaf;
|
this.deaf = !!data.deaf;
|
||||||
this.mute = !!data.mute;
|
this.mute = !!data.mute;
|
||||||
this.pending = !!data.pending;
|
this.pending = !!data.pending;
|
||||||
this.communicationDisabledUntilTimestamp =
|
this.communicationDisabledUntilTimestamp =
|
||||||
data.communication_disabled_until
|
data.communication_disabled_until
|
||||||
? Number.parseInt(data.communication_disabled_until)
|
? Date.parse(data.communication_disabled_until)
|
||||||
: undefined;
|
: undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user