Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Epoch int64 = 1420070400000
Functions ¶
This section is empty.
Types ¶
type DeconstructedSnowflake ¶
type DeconstructedSnowflake struct { Time time.Time WorkerID int64 ProcessID int64 Increment int64 }
DeconstructedSnowflake contains the properties used by Discord for each CommandID
type Snowflake ¶
type Snowflake string
Snowflake is a general utility type around discord's IDs
func GetSnowflakeEnv ¶
GetSnowflakeEnv returns a new Snowflake from an environment variable
func NewSnowflake ¶
NewSnowflake returns a new Snowflake based on the given time.Time
func ParseString ¶
ParseString parses a fmt.Stringer into a Snowflake
func ParseUInt64 ¶
ParseUInt64 parses an uint64 into a Snowflake
func (Snowflake) Deconstruct ¶
func (s Snowflake) Deconstruct() DeconstructedSnowflake
Deconstruct returns DeconstructedSnowflake (https://discord.com/developers/docs/reference#snowflakes-snowflake-id-format-structure-left-to-right)
Click to show internal directories.
Click to hide internal directories.