Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Member): Parse Member#premiumSince to timestamp #1318

Merged
merged 3 commits into from
May 27, 2022

Conversation

bsian03
Copy link
Collaborator

@bsian03 bsian03 commented Dec 21, 2021

Fixes #1316

@bsian03 bsian03 added the bug label Dec 21, 2021
@DonovanDMC
Copy link
Contributor

premium_since is defined as both optional & nullable in the docs, optional is handled, nullable is not -- this results in NaN

@bsian03
Copy link
Collaborator Author

bsian03 commented Dec 21, 2021

What if you don't want a number smh

@JustCat80
Copy link
Contributor

JustCat80 commented Dec 21, 2021

in that case perfect because it is not, luck with your project 👍

@danny-may
Copy link

danny-may commented Dec 21, 2021

From what im reading in the docs, cant the value be null, undefined or a string? Shouldnt the type guard be a nullish check or a typeof x === 'string' check? Strict null equality would break I believe

@bsian03
Copy link
Collaborator Author

bsian03 commented Dec 21, 2021

But.. we already have an undefined check

@danny-may
Copy link

Ah, on the lines above, I missed that. Ignore me :)

DonovanDMC
DonovanDMC previously approved these changes May 11, 2022
Copy link
Contributor

@DonovanDMC DonovanDMC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typings (nullable & optional on both Member & OldMember)

eris/index.d.ts

Line 654 in b2a90ea

premiumSince: number;

eris/index.d.ts

Line 3046 in b2a90ea

premiumSince: number;

@DonovanDMC DonovanDMC merged commit 65b1850 into abalabahaha:dev May 27, 2022
DonovanDMC added a commit to DonovanArchive/ErisPRUpdateBot that referenced this pull request May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Member.premiumsince not converted to epoch timestamp
4 participants