(result: Optional[Dict[str, Any]])
Retrieve 'data' field from the API result object.

    :param result: API result that received from OneBot
    :return: the 'data' field in result object
    :raise ActionFailed: the 'status' field is 'failed'
Retrieve 'data' field from the API result object.
Retrieve data field from the API result object .
def _handle_api_result(result: Optional[Dict[str, Any]]) -> Any:
    """
    Retrieve 'data' field from the API result object.

    :param result: API result that received from OneBot
    :return: the 'data' field in result object
    :raise ActionFailed: the 'status' field is 'failed'
    """
    if isinstance(result, dict):
        if result['status'] == 'failed':
            raise ActionFailed(result=result)
        return result.get('data')
def _handle_api_result ( result : Optional [ Dict [ str , Any ] ] ) -> Any : if isinstance ( result , dict ) : if result [ 'status' ] == 'failed' : raise ActionFailed ( result = result ) return result . get ( 'data' )