Discore
Show / Hide Table of Contents

Struct Snowflake

Twitter's snowflake format. Used for IDs in the Discord API. https://github.com/twitter/snowflake/tree/snowflake-2010

Implements
IEquatable<Snowflake>
Inherited Members
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: Discore
Assembly: Discore.dll
Syntax
public struct Snowflake : IEquatable<Snowflake>

Constructors

Name Description
Snowflake(ulong)

Fields

Name Description
Id
None

Gets a snowflake representing nothing (or zero).

This can be used when modifying objects such as guilds (e.g. setting/removing an AFK channel).

Leaving properties null when modifying a guild will cause them to be left unchanged. However, None will clear the value (i.e. removing the AFK channel).

Methods

Name Description
Equals(Snowflake)
Equals(object?)
GetHashCode()
GetIncrement()
GetProcessId()
GetTimestamp()
GetWorkerId()
Parse(string)

Parses a snowflake from a string.

ParseOrNull(string?)

Attempts to parses a snowflake from a string, returns null if the parse failed.

ToString()
TryParse(string?, out Snowflake)

Attempts to parse a snowflake from a string.

Operators

Name Description
operator ==(Snowflake, Snowflake)
implicit operator ulong(Snowflake)
implicit operator Snowflake(ulong)
operator !=(Snowflake, Snowflake)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX