mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
Rename snowflake class to prevent naming conflicts
This commit is contained in:
@@ -10,6 +10,7 @@ module.exports = {
|
|||||||
escapeMarkdown: require('./util/EscapeMarkdown'),
|
escapeMarkdown: require('./util/EscapeMarkdown'),
|
||||||
fetchRecommendedShards: require('./util/FetchRecommendedShards'),
|
fetchRecommendedShards: require('./util/FetchRecommendedShards'),
|
||||||
Snowflake: require('./util/Snowflake'),
|
Snowflake: require('./util/Snowflake'),
|
||||||
|
SnowflakeUtil: require('./util/Snowflake'),
|
||||||
|
|
||||||
Channel: require('./structures/Channel'),
|
Channel: require('./structures/Channel'),
|
||||||
ClientOAuth2Application: require('./structures/ClientOAuth2Application'),
|
ClientOAuth2Application: require('./structures/ClientOAuth2Application'),
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ let INCREMENT = 0;
|
|||||||
/**
|
/**
|
||||||
* A container for useful snowflake-related methods
|
* A container for useful snowflake-related methods
|
||||||
*/
|
*/
|
||||||
class Snowflake {
|
class SnowflakeUtil {
|
||||||
/**
|
/**
|
||||||
* A Twitter snowflake, except the epoch is 2015-01-01T00:00:00.000Z
|
* A Twitter snowflake, except the epoch is 2015-01-01T00:00:00.000Z
|
||||||
* ```
|
* ```
|
||||||
@@ -62,4 +62,4 @@ function pad(v, n, c = '0') {
|
|||||||
return String(v).length >= n ? String(v) : (String(c).repeat(n) + v).slice(-n);
|
return String(v).length >= n ? String(v) : (String(c).repeat(n) + v).slice(-n);
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = Snowflake;
|
module.exports = SnowflakeUtil;
|
||||||
|
|||||||
Reference in New Issue
Block a user