If any offense enumerated in section six of this article be committed in the presence of a justice within his county, or, the offender being brought before him, the commission thereof be proved to his satisfaction, he may, besides requiring a bond or recognizance with surety, as provided in the preceding section, impose a fine upon the offender not exceeding five dollars. If such bond or recognizance be not then and there given, or such fine be not then and there paid, such justice shall commit the offender to the jail of his county, there to remain until such bond or recognizance be given, and such fine be paid; but no imprisonment under this section shall continue more than ten days, at the end of which the sheriff or jailer shall discharge the prisoner, unless he has been commanded by proper authority to detain him for some other cause.
W. Va. Code § 62-10-7