This adds more accurate utils for generating a snowflake from datetime. #91
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "JDJGInc/2.0"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Checklist
generates this in docs:

Should I have it still return int or do an object ?
I tested the code, I just need docs to look better.
I just need to update the doc string a bit
Can you remove the unrelated changes? Seems like you ran black without specifying line length.
black did it automatically for whatever reason.
I have fixed the issue, now. :D
Why have
generate_snowflake
andtime_snowflake
?Both appear in docs because well, I have a feeling some might want to use both.
I will gladly remove Danny's one from docs if you want.
I don't mean from the docs, I mean what is the point of having both functions at all? generate_snowflake seems to say in the docstring it is just better time_snowflake
time_snowflake is required by danny's functions, my function just tends to be more accurate to the datetime when creating an id.
removed time_snowflake from docs, as it needs to use this internally, but my function should be more accurate for user purposes.
This is only due to tests in the discord api guild to show it's more accurate, if you look for the discussion you should see it, it should be accurate, however Discord.py still uses danny's function internally, so I removed the docs for the function that Danny made, however people can still use the one i made.
the problem with that is that the library uses time_snowflake internally.
with the discord.iterators file, so both will need to exist.
My function however is better for users wanting to make snowflake ids from the current time.
Unless you can replace the original function I don't see the value in keeping what is essentially a duplicate function.
This is more accurate than danny's function, the library just happens to need Danny's function to work properly, however my function is more useful for user side generation of snowflakes.
Checkout
From your project repository, check out a new branch and test the changes.