Skip to content

Remove entities and events helpers #2236

Open
@davfsa

Description

@davfsa

In preparation for msgspec, we need to get rid of entity helpers like get_x or fetch_x, always ensuring that we have suitable alternatives.

dm_user

First case that comes to mind when thinking about this is messaging users. The flow usually goes:

  1. Getting or fetching the dm channel
  2. Sending a message to that user.

A dm_user function could merge those into a single call for the user. We can also leverage the cache to check for known dm channels that are created (create_dm_channel already does this) and avoid 2 API calls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingThis change hurts backwards compatibilityenhancementNew feature or request

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions