def register_command(self, regex: str) -> Callable[([Callable], Callable)]:

    def decorator(function: Callable[(..., Awaitable[Any])]) -> Callable[(..., Awaitable[Any])]:
        self.command_handlers[regex] = function
        return function
    return decorator
def register_command(self, regex: str) -> Callable[([Callable], Callable)]:

    def decorator(function: Callable[(..., Awaitable[Any])]) -> Callable[(..., Awaitable[Any])]:
        self.command_handlers[regex] = function
        return function
    return decorator