This was my first thought so I left it out, although if it is left out occasionally the bot wont succesfully interact with the rock but the rock is there. Therefore the bot wont do anything so i just do a check so that if the player isnt doing anything then find a rock.
Also most humans will sometimes click the rock twice, I know i do when Im, and with the random delay, the bot will occasionally click the rock twice but not after it has started mining.