curious.dataclasses.bases

Base classes that all dataclasses inherit from.

Functions

allow_external_makes() Using this with a with allows dataclasses to be made outside of curious’ internal code.

Classes

Dataclass(id, cl) The base class for all dataclasses.
IDObject(id) This object is comparable using the snowflake as an ID.
class curious.dataclasses.bases.Dataclass(id: int, cl: curious.core.client.Client)[source]

Bases: curious.dataclasses.bases.IDObject

The base class for all dataclasses.

These contain a reference to the current bot as _bot.

Inspects the stack to ensure we’re being called correctly.

snowflake_timestamp
Return type:datetime
Returns:The timestamp of the snowflake.
class curious.dataclasses.bases.IDObject(id: int)[source]

Bases: object

This object is comparable using the snowflake as an ID.

It is also hashable, using the ID as a hash.

Parameters:id (int) – The snowflake ID of the object.
snowflake_timestamp
Return type:datetime
Returns:The timestamp of the snowflake.
with curious.dataclasses.bases.allow_external_makes()[source]

Using this with a with allows dataclasses to be made outside of curious’ internal code.

Return type:None