interactions.py icon indicating copy to clipboard operation
interactions.py copied to clipboard

[REQUEST] Mixin implementations

Open i0bs opened this issue 3 years ago • 1 comments

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):

i0bs avatar Feb 07 '22 20:02 i0bs

#681

kyteware avatar Mar 29 '22 05:03 kyteware

Marking this as resolved since mostly implemented and lack of activity

EepyElvyra avatar Aug 21 '22 20:08 EepyElvyra