Register a hook to be called after a command is completed, whether it completes successfully or not.
(
self, func: Callable[[plugin.CommandFinalizationData], plugin.CommandFinalizationData]
)
| 5907 | raise TypeError(f"{func.__name__} must declare return a return type of {plugin.CommandFinalizationData}") |
| 5908 | |
| 5909 | def register_cmdfinalization_hook( |
| 5910 | self, func: Callable[[plugin.CommandFinalizationData], plugin.CommandFinalizationData] |
| 5911 | ) -> None: |
| 5912 | """Register a hook to be called after a command is completed, whether it completes successfully or not.""" |
| 5913 | self._validate_cmdfinalization_callable(func) |
| 5914 | self._cmdfinalization_hooks.append(func) |
| 5915 | |
| 5916 | def _resolve_func_self( |
| 5917 | self, |