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 ¶ added in v1.0.1
GetSnowflakeEnv returns a new Snowflake from an environment variable
func NewSnowflake ¶
NewSnowflake returns a new Snowflake based on the given time.Time
func ParseInt64 ¶ added in v1.0.3
ParseInt64 parses an int64 into a Snowflake
func ParseString ¶ added in v1.0.4
ParseString parses a fmt.Stringer into a Snowflake
func ParseUInt64 ¶ added in v1.0.3
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.