Skip to content

Remove types.Snowflake to avoid confusion with abc.Snowflake #197

@Paillat-dev

Description

@Paillat-dev

Problem

There are currently two Snowflake definitions:

  • abc.Snowflake - The protocol/ABC for snowflake objects
  • types.Snowflake - Not even a model, just a type alias

This creates confusion throughout the library, with the incorrect one being used multiple times. This is likely due to people using auto imports and accidentally importing the wrong one.

Proposed Solution

Remove types.Snowflake entirely and just use int | str directly where a snowflake ID type is needed. This:

  • Uses fewer characters
  • Eliminates confusion between abc.Snowflake and types.Snowflake
  • Makes it clearer when we're talking about an ID vs a snowflake object

Context

This issue was identified during next refactor planning discussions.

Reference: https://canary.discord.com/channels/881207955029110855/1401527338470084819/1440705381901799504

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions