Skip to content

Refactor discord/types: improve naming, inheritance, and organization #196

@Paillat-dev

Description

@Paillat-dev

Problem

The discord/types module has several issues that need to be addressed:

  1. Outdated types: Some type definitions are not up to date with the Discord API
  2. Insufficient use of inheritance: Types don't leverage inheritance as much as they should
  3. General messiness: The types module is often messy and hard to navigate
  4. Naming confusion: Currently, we import types like from types import X as XPayload, which creates confusion about what classes actually represent

Proposed Solution

  • Clean up and update outdated type definitions
  • Refactor types to better use inheritance where appropriate
  • Improve naming convention: Instead of import X from types as XPayload, directly name them as XPayload in the types module itself
  • This would make it clearer what a class actually represents and reduce confusion

Context

This was discussed as part of the next refactor planning.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions