#Whats the difference between the different imports?
1 messages · Page 1 of 1 (latest)
discord.js' is type Snowflake = string;, the other is a class pre-instantiated as DiscordSnowflake and TwitterSnowflake, which serves snowflake utilities to read data from it. Discord.js re-exports the former as SnowflakeUtil.
discord.js only exports a type which is an alias for string. @sapphire/snowflake is a TS implementation of the snowflake system. They are 2 completely different things.
(also you could've found this out by checking the djs and sapphire docs)
Thank you for marking this question as solved!
1093553848104255488
1093558576557084824
this doesn't answer my full question.
its less specific about the Snowflake until but more generally a "how to proceed when there are two equal called functions to import that (often) do the same"
Is it better to import from DJs, because it's "safer" of some kind, or the one from the smaller package for reason xyz?
codeBlock would be a good example for example.
(if its the same)
is it better to use the djs or the djs utilities one?