Skip to content

[REQUEST] Mixin implementations #487

@i0bs

Description

@i0bs

What is the feature you're proposing?
With the ever-growing complexity of context functionality being used in our commands and components, we're in a situation where we need to abstract and break apart the code written for it in more simplified methods that don't involve dunder abstractions. Because of this, we're looking into metaclassing other classes that purely add methods as "mixins."

  • EventMixin: a mixin that can build event data, this will theoretically run on top of DictMixin but for Gateway-unique events that do not work off of objects.
  • ContextMixin: a mixin that will serve the purpose of simple super().method(**kwargs) method implementations in various context managers, e.g. send and edit methods.
  • ErrorMixin: a mixin for base support of the ErrorFormatter class that allow custom message, id and extended_message attributes. extended_message should be designed to represent the nested information of a dictionary to a key -> value arrow tree in the form of a string.

Additional Information

  • My feature request is related to an existing Issue.
    • Issue (if referenceable):

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

Status

Complete

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions