interactions.py
interactions.py copied to clipboard
[REQUEST] Mixin implementations
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 ofDictMixinbut for Gateway-unique events that do not work off of objects.ContextMixin: a mixin that will serve the purpose of simplesuper().method(**kwargs)method implementations in various context managers, e.g. send and edit methods.ErrorMixin: a mixin for base support of theErrorFormatterclass that allow custommessage,idandextended_messageattributes.extended_messageshould be designed to represent the nested information of a dictionary to akey -> valuearrow tree in the form of a string.
Additional Information
- [ ] My feature request is related to an existing Issue.
- Issue (if referenceable):
#681
Marking this as resolved since mostly implemented and lack of activity