| Total Complexity | 0 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | # Copyright Pincer 2021-Present |
||
|
|
|||
| 2 | # Full MIT License can be found in `LICENSE` at the project root. |
||
| 3 | |||
| 4 | from typing import Dict |
||
| 5 | |||
| 6 | |||
| 7 | from ._component import _Component |
||
| 8 | from ...utils.types import Singleton |
||
| 9 | from ...objects.app.command import InteractableStructure |
||
| 10 | |||
| 11 | |||
| 12 | class ComponentHandler(metaclass=Singleton): |
||
| 13 | """Handles registered components |
||
| 14 | |||
| 15 | Attributes |
||
| 16 | ---------- |
||
| 17 | register : Dict[:class:`str`, :class:`Callable`] |
||
| 18 | Dictionary of registered buttons. |
||
| 19 | """ |
||
| 20 | |||
| 21 | register: Dict[str, InteractableStructure[_Component]] = {} |
||
| 22 |