We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b897a08 commit b86ae9fCopy full SHA for b86ae9f
discord/object.py
@@ -91,3 +91,18 @@ def __repr__(self) -> str:
91
def created_at(self) -> datetime.datetime:
92
""":class:`datetime.datetime`: Returns the snowflake's creation time in UTC."""
93
return utils.snowflake_time(self.id)
94
+
95
+ @property
96
+ def worker_id(self) -> int:
97
+ """:class:`int`: Returns the worker id that made the snowflake."""
98
+ return (self.id & 0x3E0000) >> 17
99
100
101
+ def process_id(self) -> int:
102
+ """:class:`int`: Returns the process id that made the snowflake."""
103
+ return (self.id & 0x1F000) >> 12
104
105
106
+ def increment_id(self) -> int:
107
+ """:class:`int`: Returns the increment id that made the snowflake."""
108
+ return (self.id & 0xFFF)
0 commit comments